From e62f8f76d0bbf755ed5d90f44c10ae8f58605202 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 1 Feb 2023 13:47:24 +0000 Subject: trivial: Add some debugging when resetting the event index --- gusb/gusb-device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index 817c5f2..69901b6 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -861,8 +861,11 @@ g_usb_device_load_event(GUsbDevice *self, const gchar *id) GUsbDevicePrivate *priv = GET_PRIVATE(self); /* reset back to the beginning */ - if (priv->event_idx >= priv->events->len) + if (priv->event_idx >= priv->events->len) { + if (_g_usb_context_has_flag(priv->context, G_USB_CONTEXT_FLAGS_DEBUG)) + g_debug("resetting event index"); priv->event_idx = 0; + } /* look for the next event in the sequence */ for (guint i = priv->event_idx; i < priv->events->len; i++) { -- cgit v1.2.1