[PATCH 2/4] iface-modem-location: port mm_iface_modem_location_enable to use GTask

Aleksander Morgado aleksander at aleksander.es
Tue Jun 27 08:26:53 UTC 2017


On Tue, Jun 27, 2017 at 7:53 AM, Ben Chan <benchan at chromium.org> wrote:
> +    if (g_cancellable_is_cancelled (g_task_get_cancellable (task))) {
> +        g_task_return_new_error (task,
> +                                 MM_CORE_ERROR,
> +                                 MM_CORE_ERROR_CANCELLED,
> +                                 "Interface enabling cancelled");
> +        g_object_unref (task);
>          return;
> +    }

As with the previous one, I believe we should start using this instead:

if (g_task_return_error_if_cancelled (task)) {
    g_object_unref (task);
    return;
}

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list