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

Aleksander Morgado aleksander at aleksander.es
Fri Apr 7 08:40:45 UTC 2017


On 06/04/17 21:38, Ben Chan wrote:
> ---
>  src/mm-auth-provider.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 

Pushed to git master, thanks!

> 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);
>  }
>  
>  /*****************************************************************************/
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list