[Spice-devel] [spice-gtk Win32 v2 PATCH 3/5] Windows mingw: usb: add win-usb-dev.[ch]: implement GUdevDevice & GUdevClient

Arnon Gilboa agilboa at redhat.com
Mon May 28 00:06:25 PDT 2012


I am working on removal of all libusb dependency in win-usb-dev, which 
cleanups this mess.

Hans de Goede wrote:
>> diff --git a/gtk/win-usb-dev.c b/gtk/win-usb-dev.c
>> new file mode 100644
>> index 0000000..7503c41
>> --- /dev/null
>> +++ b/gtk/win-usb-dev.c
>
> <snip>
>
>> +    rc = libusb_init(NULL);
>> +    g_return_val_if_fail(rc>= 0, FALSE);
>
> Ugh using a global libusb context is BAD, remember spice-gtk is a 
> library, so in the long
> run it could get linked into a program which is also using libusb in 
> some other way.
>
> This is acceptable for now, but it really should be high on the TODO 
> list of things
> to fix. OTOH we might get hotplug support in libusbx first :)
>
> Regards,
>
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list