[Spice-devel] [spice-gtk Win32 v5 07/22] spice_usb_device_manager_auto_connect_cb: use type SpiceUsbDevice for "device"
Uri Lublin
uril at redhat.com
Mon Jul 9 05:14:50 PDT 2012
Currently SpiceUsbDevice is a BOX for libusb_device.
In preparation for a different SpiceUsbDevice.
---
gtk/usb-device-manager.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index d4ad1f9..dbf3493 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -520,12 +520,12 @@ static void spice_usb_device_manager_auto_connect_cb(GObject *gobject,
gpointer user_data)
{
SpiceUsbDeviceManager *self = SPICE_USB_DEVICE_MANAGER(gobject);
- libusb_device *device = user_data;
+ SpiceUsbDevice *device = user_data;
GError *err = NULL;
spice_usb_device_manager_connect_device_finish(self, res, &err);
if (err) {
- gchar *desc = spice_usb_device_get_description((SpiceUsbDevice *)device, NULL);
+ gchar *desc = spice_usb_device_get_description(device, NULL);
g_prefix_error(&err, "Could not auto-redirect %s: ", desc);
g_free(desc);
@@ -533,7 +533,7 @@ static void spice_usb_device_manager_auto_connect_cb(GObject *gobject,
g_signal_emit(self, signals[AUTO_CONNECT_FAILED], 0, device, err);
g_error_free(err);
}
- libusb_unref_device(device);
+ libusb_unref_device((libusb_device*)device);
}
static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager *self,
--
1.7.1
More information about the Spice-devel
mailing list