summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-08-21 14:30:51 +0200
committerHans de Goede <hdegoede@redhat.com>2013-08-21 14:30:51 +0200
commit0fc304da83595da9830bf368f66312ffd793f10c (patch)
treeddc7964b8d9c0ea25f7ab1145349de11e14bda0a
parentbe76bef5b716d27b78fba120d3f9b815ed3380b9 (diff)
downloadlibusb-0fc304da83595da9830bf368f66312ffd793f10c.tar.gz
hotplug: Document that callbacks cannot unregister themselves when called from hotplug_register_callback
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--libusb/hotplug.c6
-rw-r--r--libusb/version_nano.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/libusb/hotplug.c b/libusb/hotplug.c
index 16725f2..2465f6e 100644
--- a/libusb/hotplug.c
+++ b/libusb/hotplug.c
@@ -59,7 +59,11 @@
*
* A callback function must return an int (0 or 1) indicating whether the callback is
* expecting additional events. Returning 0 will rearm the callback and 1 will cause
- * the callback to be deregistered.
+ * the callback to be deregistered. Note that when callbacks are called from
+ * libusb_hotplug_register_callback() because of the \ref LIBUSB_HOTPLUG_ENUMERATE
+ * flag, the callback return value is ignored, iow you cannot cause a callback
+ * to be deregistered by returning 1 when it is called from
+ * libusb_hotplug_register_callback().
*
* Callbacks for a particular context are automatically deregistered by libusb_exit().
*
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 4972515..c265037 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10814
+#define LIBUSB_NANO 10815