diff options
author | Ben Chan <benchan@chromium.org> | 2017-09-12 04:06:22 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-09-13 16:36:49 +0200 |
commit | b7bfba3e54b5b5ac34e3329f0ad6503a80568ebd (patch) | |
tree | 7a76c10d0472f8009cc1b57ae251dd3901afb6a3 | |
parent | 18a55f6940e068e52db8e766cccd97545f7205e3 (diff) |
icera: port modem_time_check_support to use GTask
-rw-r--r-- | plugins/icera/mm-broadband-modem-icera.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c index dff73a8e..19c51b82 100644 --- a/plugins/icera/mm-broadband-modem-icera.c +++ b/plugins/icera/mm-broadband-modem-icera.c @@ -1751,11 +1751,7 @@ modem_time_check_support_finish (MMIfaceModemTime *self, GAsyncResult *res, GError **error) { - /* We assume Icera devices always support *TLTS, since they appear - * to return ERROR if the modem is not powered up, and thus we cannot - * check for *TLTS support during modem initialization. - */ - return TRUE; + return g_task_propagate_boolean (G_TASK (res), error); } static void @@ -1763,15 +1759,16 @@ modem_time_check_support (MMIfaceModemTime *self, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GTask *task; - result = g_simple_async_result_new (G_OBJECT (self), - callback, - user_data, - modem_time_check_support); + task = g_task_new (self, NULL, callback, user_data); - g_simple_async_result_complete_in_idle (result); - g_object_unref (result); + /* We assume Icera devices always support *TLTS, since they appear + * to return ERROR if the modem is not powered up, and thus we cannot + * check for *TLTS support during modem initialization. + */ + g_task_return_boolean (task, TRUE); + g_object_unref (task); } /*****************************************************************************/ |