On 2013.07.12 14:10, Florian Albrechtskirchinger wrote:
> --- 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 :
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.
---
libusb/hotplug.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libusb/hotplug.c b/libusb/hotplug.c
index 6b04342..36
The accompanying patch changes the hotplug callback invocation to always pass
the explicit context pointer.
The current behavior doesn't permit comparing contexts in the callback, when
dealing with multiple contexts, as the comparison will fail, if the context is
also the default and therefore N