diff options
Diffstat (limited to 'src/usb-device-manager.c')
-rw-r--r-- | src/usb-device-manager.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 85231a1..73a67ce 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -42,6 +42,8 @@ #include "usbutil.h" #endif +#include "gtask-helper.h" + #include "spice-session-priv.h" #include "spice-client.h" #include "spice-marshal.h" @@ -1442,7 +1444,7 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self, guint i; if (spice_usb_device_manager_is_device_connected(self, device)) { - g_task_return_new_error(task, + g_task_helper_return_new_error(task, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED, "Cannot connect an already connected usb device"); goto done; @@ -1466,10 +1468,10 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self, g_ptr_array_remove(priv->devices, device); g_signal_emit(self, signals[DEVICE_REMOVED], 0, device); spice_usb_device_unref(device); - g_task_return_new_error(task, - SPICE_CLIENT_ERROR, - SPICE_CLIENT_ERROR_FAILED, - _("Device was not found")); + g_task_helper_return_new_error(task, + SPICE_CLIENT_ERROR, + SPICE_CLIENT_ERROR_FAILED, + _("Device was not found")); goto done; } #endif @@ -1484,9 +1486,9 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self, } #endif - g_task_return_new_error(task, - SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED, - _("No free USB channel")); + g_task_helper_return_new_error(task, + SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED, + _("No free USB channel")); #ifdef USE_USBREDIR done: #endif |