diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/cinterion/mm-broadband-bearer-cinterion.c | 7 | ||||
-rw-r--r-- | plugins/novatel/mm-common-novatel.c | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/plugins/cinterion/mm-broadband-bearer-cinterion.c b/plugins/cinterion/mm-broadband-bearer-cinterion.c index 741d2935..a1c699e9 100644 --- a/plugins/cinterion/mm-broadband-bearer-cinterion.c +++ b/plugins/cinterion/mm-broadband-bearer-cinterion.c @@ -343,10 +343,6 @@ handle_cancel_dial (GTask *task) NULL, NULL); g_free (command); - - g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_CANCELLED, - "Connection operation has been cancelled"); - g_object_unref (task); } static void @@ -357,8 +353,9 @@ dial_3gpp_context_step (GTask *task) ctx = (Dial3gppContext *) g_task_get_task_data (task); /* Check for cancellation */ - if (g_cancellable_is_cancelled (g_task_get_cancellable (task))) { + if (g_task_return_error_if_cancelled (task)) { handle_cancel_dial (task); + g_object_unref (task); return; } diff --git a/plugins/novatel/mm-common-novatel.c b/plugins/novatel/mm-common-novatel.c index 96d845f1..f8c78f51 100644 --- a/plugins/novatel/mm-common-novatel.c +++ b/plugins/novatel/mm-common-novatel.c @@ -87,10 +87,9 @@ custom_init_step (GTask *task) ctx = g_task_get_task_data (task); /* If cancelled, end */ - if (g_cancellable_is_cancelled (g_task_get_cancellable (task))) { + if (g_task_return_error_if_cancelled (task)) { mm_dbg ("(Novatel) no need to keep on running custom init in (%s)", mm_port_get_device (MM_PORT (ctx->port))); - g_task_return_boolean (task, TRUE); g_object_unref (task); return; } |