[Spice-devel] [spice-gtk v1 4/5] win-usb-dev: Let finalize do libusb_exit()

Victor Toso victortoso at redhat.com
Tue Nov 15 12:58:03 UTC 2016


On Tue, Nov 15, 2016 at 12:06:02PM +0100, Christophe Fergeau wrote:
> On Tue, Nov 15, 2016 at 12:26:54AM +0100, Victor Toso wrote:
> > From: Victor Toso <me at victortoso.com>
> > 
> > This fixes a hanging on mingw-spice-gtk when the GUdevClient fails to
> > initialize due problems in the UsbDk installation.
> 
> "This fixes a hang in mingw-spice-gtk ... due to problems ..."
> I'd change the shortlog to _finalize() or finalize() so that it's clear
> that it's a method name.

Ok, I'll fix it

>
> >
> > The libusb_exit() will be called on priv->ctx in
> > g_udev_client_initable_init() and also it will be called on NULL at
> > g_udev_client_finalize(), making the application hang on
> > initialization.
>
> On initialization? Is this because g_udev_client_finalize() is going to
> get called when g_udev_client_initable_init() fails?

Yes, the object is already created at g_udev_client_initable_init() so
when it fails it calls _finalize()

I'll send a v2 for this one as is the most interesting patch in this
batch for me.

>
> Acked-by: Christophe Fergeau <cfergeau at redhat.com>
>
>
> Christophe

Cheers,
    toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161115/7589cd63/attachment.sig>


More information about the Spice-devel mailing list