summaryrefslogtreecommitdiffstats
path: root/src/usb-acl-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usb-acl-helper.c')
-rw-r--r--src/usb-acl-helper.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/usb-acl-helper.c b/src/usb-acl-helper.c
index 487e1ee..231ac23 100644
--- a/src/usb-acl-helper.c
+++ b/src/usb-acl-helper.c
@@ -25,6 +25,8 @@
#include <stdio.h>
#include <string.h>
+#include "gtask-helper.h"
+
#include "usb-acl-helper.h"
/* ------------------------------------------------------------------ */
@@ -91,7 +93,7 @@ static void spice_usb_acl_helper_class_init(SpiceUsbAclHelperClass *klass)
static void async_result_set_cancelled(GTask *task)
{
- g_task_return_new_error(task,
+ g_task_helper_return_new_error(task,
G_IO_ERROR, G_IO_ERROR_CANCELLED,
"Setting USB device node ACL cancelled");
}
@@ -120,11 +122,11 @@ static gboolean cb_out_watch(GIOChannel *channel,
string[strlen(string) - 1] = 0;
if (!strcmp(string, "SUCCESS")) {
success = TRUE;
- g_task_return_boolean(priv->task, TRUE);
+ g_task_helper_return_boolean(priv->task, TRUE);
} else if (!strcmp(string, "CANCELED")) {
async_result_set_cancelled(priv->task);
} else {
- g_task_return_new_error(priv->task,
+ g_task_helper_return_new_error(priv->task,
SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
"Error setting USB device node ACL: '%s'",
string);
@@ -132,10 +134,10 @@ static gboolean cb_out_watch(GIOChannel *channel,
g_free(string);
break;
case G_IO_STATUS_ERROR:
- g_task_return_error(priv->task, err);
+ g_task_helper_return_error(priv->task, err);
break;
case G_IO_STATUS_EOF:
- g_task_return_new_error(priv->task,
+ g_task_helper_return_new_error(priv->task,
SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
"Unexpected EOF reading from acl helper stdout");
break;