58 lines
2.2 KiB
Diff
58 lines
2.2 KiB
Diff
From d254749d56e05b23852d23989419796c264c5c3e Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Fri, 21 Sep 2012 15:32:23 +0000
|
|
Subject: [PATCH 09/21] UsbDeviceManager: Build channel list after building
|
|
the device list
|
|
|
|
This is necessary for redirect-on-connect
|
|
Resolves: rhbz#820964
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
gtk/usb-device-manager.c | 22 +++++++++++-----------
|
|
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
|
|
index 6a7f10a..c30e67b 100644
|
|
--- a/gtk/usb-device-manager.c
|
|
+++ b/gtk/usb-device-manager.c
|
|
@@ -249,17 +249,6 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable,
|
|
return FALSE;
|
|
}
|
|
|
|
- /* Start listening for usb channels connect/disconnect */
|
|
- g_signal_connect(priv->session, "channel-new",
|
|
- G_CALLBACK(channel_new), self);
|
|
- g_signal_connect(priv->session, "channel-destroy",
|
|
- G_CALLBACK(channel_destroy), self);
|
|
- list = spice_session_get_channels(priv->session);
|
|
- for (it = g_list_first(list); it != NULL; it = g_list_next(it)) {
|
|
- channel_new(priv->session, it->data, (gpointer*)self);
|
|
- }
|
|
- g_list_free(list);
|
|
-
|
|
/* Start listening for usb devices plug / unplug */
|
|
priv->udev = g_udev_client_new(subsystems);
|
|
g_signal_connect(G_OBJECT(priv->udev), "uevent",
|
|
@@ -276,6 +265,17 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable,
|
|
libusb_free_device_list(priv->coldplug_list, 1);
|
|
priv->coldplug_list = NULL;
|
|
|
|
+ /* Start listening for usb channels connect/disconnect */
|
|
+ g_signal_connect(priv->session, "channel-new",
|
|
+ G_CALLBACK(channel_new), self);
|
|
+ g_signal_connect(priv->session, "channel-destroy",
|
|
+ G_CALLBACK(channel_destroy), self);
|
|
+ list = spice_session_get_channels(priv->session);
|
|
+ for (it = g_list_first(list); it != NULL; it = g_list_next(it)) {
|
|
+ channel_new(priv->session, it->data, (gpointer*)self);
|
|
+ }
|
|
+ g_list_free(list);
|
|
+
|
|
return TRUE;
|
|
#else
|
|
g_set_error_literal(err, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
|
|
--
|
|
1.7.12.1
|
|
|