aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/iridium/mm-broadband-modem-iridium.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/iridium/mm-broadband-modem-iridium.c b/plugins/iridium/mm-broadband-modem-iridium.c
index 7c3a86d9..a5a8495f 100644
--- a/plugins/iridium/mm-broadband-modem-iridium.c
+++ b/plugins/iridium/mm-broadband-modem-iridium.c
@@ -224,7 +224,7 @@ load_supported_modes_finish (MMIfaceModem *self,
GAsyncResult *res,
GError **error)
{
- return g_array_ref (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res)));
+ return g_task_propagate_pointer (G_TASK (res), error);
}
static void
@@ -232,14 +232,9 @@ load_supported_modes (MMIfaceModem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GSimpleAsyncResult *result;
GArray *combinations;
MMModemModeCombination mode;
-
- result = g_simple_async_result_new (G_OBJECT (self),
- callback,
- user_data,
- load_supported_modes);
+ GTask *task;
/* Build list of combinations */
combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 1);
@@ -249,9 +244,9 @@ load_supported_modes (MMIfaceModem *self,
mode.preferred = MM_MODEM_MODE_NONE;
g_array_append_val (combinations, mode);
- g_simple_async_result_set_op_res_gpointer (result, combinations, (GDestroyNotify) g_array_unref);
- g_simple_async_result_complete_in_idle (result);
- g_object_unref (result);
+ task = g_task_new (self, NULL, callback, user_data);
+ g_task_return_pointer (task, combinations, (GDestroyNotify) g_array_unref);
+ g_object_unref (task);
}
/*****************************************************************************/