summaryrefslogtreecommitdiff
path: root/gusb/gusb-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'gusb/gusb-context.c')
-rw-r--r--gusb/gusb-context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gusb/gusb-context.c b/gusb/gusb-context.c
index e7a49b4..eb85e8a 100644
--- a/gusb/gusb-context.c
+++ b/gusb/gusb-context.c
@@ -578,6 +578,12 @@ g_usb_context_hotplug_cb(struct libusb_context *ctx,
g_assert(locker != NULL);
+ /* libusb is returning devices but LIBUSB_HOTPLUG_ENUMERATE is not set! */
+ if (!priv->done_enumerate) {
+ g_debug("ignoring device as no enumerate!!");
+ return 0;
+ }
+
helper = g_new0(GUsbContextIdleHelper, 1);
helper->self = g_object_ref(self);
helper->dev = libusb_ref_device(dev);