[PATCH 1/2] auth: port authorize to use GTask

Ben Chan benchan at chromium.org
Thu Apr 6 19:38:43 UTC 2017


---
 src/mm-auth-provider.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/mm-auth-provider.c b/src/mm-auth-provider.c
index 4ef56234..4d8766c0 100644
--- a/src/mm-auth-provider.c
+++ b/src/mm-auth-provider.c
@@ -75,15 +75,12 @@ authorize (MMAuthProvider *self,
            GAsyncReadyCallback callback,
            gpointer user_data)
 {
-    GSimpleAsyncResult *result;
+    GTask *task;
 
     /* Just create the result and complete it */
-    result = g_simple_async_result_new (G_OBJECT (self),
-                                        callback,
-                                        user_data,
-                                        authorize);
-    g_simple_async_result_complete_in_idle (result);
-    g_object_unref (result);
+    task = g_task_new (self, cancellable, callback, user_data);
+    g_task_return_boolean (task, TRUE);
+    g_object_unref (task);
 }
 
 /*****************************************************************************/
-- 
2.12.2.715.g7642488e1d-goog



More information about the ModemManager-devel mailing list