diff options
author | Ben Chan <benchan@chromium.org> | 2017-07-12 13:17:57 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-07-18 10:42:17 +0200 |
commit | 249f880c3c8ee71983b776c4453b1527cdab39ec (patch) | |
tree | 49d17e1fd1e6a4e52e73b462ae63396716dd97cd | |
parent | 8b5aa2a41cff47ac49b24f1264bee359b8122a12 (diff) |
broadband-modem: port modem_3gpp_ussd_{setup,cleanup}_unsolicited_result_codes to use GTask
-rw-r--r-- | src/mm-broadband-modem.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index c3a54706..af3f39ae 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -4901,7 +4901,7 @@ modem_3gpp_ussd_setup_cleanup_unsolicited_result_codes_finish (MMIfaceModem3gppU GAsyncResult *res, GError **error) { - return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error); + return g_task_propagate_boolean (G_TASK (res), error); } static gchar * @@ -5086,15 +5086,10 @@ set_unsolicited_result_code_handlers (MMIfaceModem3gppUssd *self, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; MMPortSerialAt *ports[2]; GRegex *cusd_regex; guint i; - - result = g_simple_async_result_new (G_OBJECT (self), - callback, - user_data, - set_unsolicited_events_handlers); + GTask *task; cusd_regex = mm_3gpp_cusd_regex_get (); ports[0] = mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)); @@ -5117,9 +5112,10 @@ set_unsolicited_result_code_handlers (MMIfaceModem3gppUssd *self, } g_regex_unref (cusd_regex); - g_simple_async_result_set_op_res_gboolean (result, TRUE); - g_simple_async_result_complete_in_idle (result); - g_object_unref (result); + + task = g_task_new (self, NULL, callback, user_data); + g_task_return_boolean (task, TRUE); + g_object_unref (task); } static void |