diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-20 14:47:48 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-08-05 12:03:45 +0200 |
commit | 364b81a70ea910181aed42b1708b2664906c6686 (patch) | |
tree | 5ed62f79ac286f78b66480bfa58e012489c20158 | |
parent | 3b99d65841bc842a5c9625e75edaa8f5c4e7b877 (diff) |
usbredir: Add a few debug logs
Currently, spice-gtk debugging logs contain no traces of the
values of the auto-redir/redir-on-connect filter, and it does not tell
you about the vid/pid of the devices being connected/redirected.
This commit adds the appropriate SPICE_DEBUG/CHANNEL_DEBUG calls so that
this data is logged.
-rw-r--r-- | src/channel-usbredir.c | 5 | ||||
-rw-r--r-- | src/usb-device-manager.c | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c index 292b82f..89f5c9d 100644 --- a/src/channel-usbredir.c +++ b/src/channel-usbredir.c @@ -326,7 +326,10 @@ void spice_usbredir_channel_connect_device_async( g_return_if_fail(SPICE_IS_USBREDIR_CHANNEL(channel)); g_return_if_fail(device != NULL); - CHANNEL_DEBUG(channel, "connecting usb channel %p", channel); + CHANNEL_DEBUG(channel, "connecting device %04x:%04x (%p) to channel %p", + spice_usb_device_get_vid(spice_device), + spice_usb_device_get_pid(spice_device), + spice_device, channel); result = g_simple_async_result_new(G_OBJECT(channel), callback, user_data, spice_usbredir_channel_connect_device_async); diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 12ad4ba..9792217 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -425,6 +425,7 @@ static void spice_usb_device_manager_set_property(GObject *gobject, break; } + SPICE_DEBUG("auto-connect filter set to %s", filter); free(priv->auto_conn_filter_rules); priv->auto_conn_filter_rules = rules; priv->auto_conn_filter_rules_count = count; @@ -449,6 +450,7 @@ static void spice_usb_device_manager_set_property(GObject *gobject, break; } + SPICE_DEBUG("redirect-on-connect filter set to %s", filter); free(priv->redirect_on_connect_rules); priv->redirect_on_connect_rules = rules; priv->redirect_on_connect_rules_count = count; @@ -885,7 +887,10 @@ static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager *self, spice_usb_device_ref(device)); } - SPICE_DEBUG("device added %p", device); + SPICE_DEBUG("device added %04x:%04x (%p)", + spice_usb_device_get_vid(device), + spice_usb_device_get_pid(device), + device); g_signal_emit(self, signals[DEVICE_ADDED], 0, device); } @@ -914,7 +919,10 @@ static void spice_usb_device_manager_remove_dev(SpiceUsbDeviceManager *self, spice_usb_device_manager_disconnect_device(self, device); - SPICE_DEBUG("device removed %p", device); + SPICE_DEBUG("device removed %04x:%04x (%p)", + spice_usb_device_get_vid(device), + spice_usb_device_get_pid(device), + device); spice_usb_device_ref(device); g_ptr_array_remove(priv->devices, device); g_signal_emit(self, signals[DEVICE_REMOVED], 0, device); |