summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Albrechtskirchinger <falbrechtskirchinger@gmail.com>2013-07-12 14:10:00 +0100
committerPete Batard <pete@akeo.ie>2013-07-23 20:23:13 +0100
commit97958ba756b2f90aa9f65cc7674bc558768dde9f (patch)
tree11f33c31fd61720997386a752d77d82b601a62ec
parentd1ed6c4d6729b7527f9d1f743242e6bcd7f49195 (diff)
downloadlibusb-97958ba756b2f90aa9f65cc7674bc558768dde9f.tar.gz
hotplug: Pass explicit context to callbacks
* Instead of passing NULL for the context to hotplug callbacks, if the context happens to be the default context, always pass the explicit context pointer.
-rw-r--r--libusb/hotplug.c3
-rw-r--r--libusb/version_nano.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/libusb/hotplug.c b/libusb/hotplug.c
index 6b04342..36a8f05 100644
--- a/libusb/hotplug.c
+++ b/libusb/hotplug.c
@@ -167,8 +167,7 @@ static int usbi_hotplug_match_cb (struct libusb_context *ctx,
return 0;
}
- return hotplug_cb->cb (ctx == usbi_default_context ? NULL : ctx,
- dev, event, hotplug_cb->user_data);
+ return hotplug_cb->cb (ctx, dev, event, hotplug_cb->user_data);
}
void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev,
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 525cd7d..f84521e 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10774
+#define LIBUSB_NANO 10775