[PATCH spice-gtk] usb: channel-new handler to be after default handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Client usually connect to channel-new to connect their
handlers, such as open-fd.

The usbmanager channel-new handler will call channel_connect() on usbredir
channels, which may call open-fd.

However, open-fd can be emitted before the client had a chance to
connect their handlers (from the channel-new callback).

Connecting after the default handler solves this case.

Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=748665
---
 gtk/usb-device-manager.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index e11eae0..7aa60c4 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -310,8 +310,7 @@ static gboolean spice_usb_device_manager_initable_init(GInitable  *initable,
 #endif
 
     /* Start listening for usb channels connect/disconnect */
-    g_signal_connect(priv->session, "channel-new",
-                     G_CALLBACK(channel_new), self);
+    spice_g_signal_connect_object(priv->session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER);
     g_signal_connect(priv->session, "channel-destroy",
                      G_CALLBACK(channel_destroy), self);
     list = spice_session_get_channels(priv->session);
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]