Re: [Libusbx-devel] [PATCH] Fix example hotplug code in comment to make it compile and work
2013-12-20 Markus Heidelberg markus.heidelb...@web.de: Also add #include directives since this is a complete program including main(). --- I'm not sure about the #include directives. If not desired, they can be discarded along with the corresponding sentence in the patch description. libusb/hotplug.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libusb/hotplug.c b/libusb/hotplug.c index 081bc79..e86c1cb 100644 --- a/libusb/hotplug.c +++ b/libusb/hotplug.c @@ -86,6 +86,11 @@ * * The following code provides an example of the usage of the hotplug interface: \code +#include libusb.h +#include stdlib.h +#include stdio.h +#include unistd.h + static int count = 0; int hotplug_callback(struct libusb_context *ctx, struct libusb_device *dev, @@ -131,10 +136,11 @@ int main (void) { } while (count 2) { +libusb_handle_events_completed(NULL, NULL); usleep(1); } - libusb_hotplug_deregister_callback(handle); + libusb_hotplug_deregister_callback(NULL, handle); libusb_exit(NULL); return 0; -- 1.8.5.2 Patch applied in https://github.com/libusb/libusb/commit/93de199d8d60822fc42b1cbf8b920132cd8bbbc6 Thanks -- Dr. Ludovic Rousseau -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] [PATCH] Fix example hotplug code in comment to make it compile and work
Unless we find something critical, I STRONGLY vote to delay it until after 1.0.18, even if it's doc. As Murphy's day (yesterday) taught me, if there's anything that can go wrong when duplicating work, it will go wrong. The github sudden breakage [1], which you are aware of, and which thankfully happened before we went live, was only the tip of the iceberg (for instance, the machine I used to upload the doc from has no working doxygen right now...). If something's gotta break, I'd rather have it break when there's only a single release being pushed out... ;) Of course, anything that looks critical is go (and right now I'm wondering if the infinite loop fix that was just submitted qualifies)... Regards, /Pete [1] https://status.github.com/messages -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel