diff options
author | Richard Hughes <richard@hughsie.com> | 2023-02-01 13:47:24 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2023-02-01 13:47:24 +0000 |
commit | e62f8f76d0bbf755ed5d90f44c10ae8f58605202 (patch) | |
tree | fd6a98207e670b8c1e4c789bda6bfa2be81f58b6 /gusb/gusb-device.c | |
parent | 1c864690b40cc686f1c948d0a5b388e0e0f785be (diff) | |
download | gusb-e62f8f76d0bbf755ed5d90f44c10ae8f58605202.tar.gz |
trivial: Add some debugging when resetting the event index
Diffstat (limited to 'gusb/gusb-device.c')
-rw-r--r-- | gusb/gusb-device.c | 5 |
1 files changed, 4 insertions, 1 deletions
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++) { |