summaryrefslogtreecommitdiffstats
path: root/src/channel-usbredir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel-usbredir.c')
-rw-r--r--src/channel-usbredir.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index 0f76126..174f37a 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -32,6 +32,8 @@
#include "usbutil.h"
#endif
+#include "gtask-helper.h"
+
#include "spice-client.h"
#include "spice-common.h"
@@ -296,14 +298,14 @@ static void spice_usbredir_channel_open_acl_cb(
spice_usbredir_channel_open_device(channel, &err);
}
if (err) {
- g_task_return_error(priv->task, err);
+ g_task_helper_return_error(priv->task, err);
libusb_unref_device(priv->device);
priv->device = NULL;
g_boxed_free(spice_usb_device_get_type(), priv->spice_device);
priv->spice_device = NULL;
priv->state = STATE_DISCONNECTED;
} else {
- g_task_return_boolean(priv->task, TRUE);
+ g_task_helper_return_boolean(priv->task, TRUE);
}
g_clear_object(&priv->acl_helper);
@@ -340,14 +342,14 @@ void spice_usbredir_channel_connect_device_async(
task = g_task_new(channel, cancellable, callback, user_data);
if (!priv->host) {
- g_task_return_new_error(task,
+ g_task_helper_return_new_error(task,
SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
"Error libusb context not set");
goto done;
}
if (priv->state != STATE_DISCONNECTED) {
- g_task_return_new_error(task,
+ g_task_helper_return_new_error(task,
SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
"Error channel is busy");
goto done;
@@ -371,7 +373,7 @@ void spice_usbredir_channel_connect_device_async(
return;
#else
if (!spice_usbredir_channel_open_device(channel, &err)) {
- g_task_return_error(task, err);
+ g_task_helper_return_error(task, err);
libusb_unref_device(priv->device);
priv->device = NULL;
g_boxed_free(spice_usb_device_get_type(), priv->spice_device);