[PATCH] novatel-lte: check if a connect operation has been cancelled

Dan Williams dcbw at redhat.com
Tue Aug 27 08:00:14 PDT 2013


On Tue, 2013-08-27 at 00:15 -0700, Ben Chan wrote:
> ---
>  plugins/novatel/mm-broadband-bearer-novatel-lte.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Pushed, thanks.

Dan

> diff --git a/plugins/novatel/mm-broadband-bearer-novatel-lte.c b/plugins/novatel/mm-broadband-bearer-novatel-lte.c
> index 7f023bc..4681c6e 100644
> --- a/plugins/novatel/mm-broadband-bearer-novatel-lte.c
> +++ b/plugins/novatel/mm-broadband-bearer-novatel-lte.c
> @@ -196,6 +196,16 @@ connect_3gpp_qmistatus_ready (MMBaseModem *modem,
>      }
>  
>      mm_dbg ("Error: '%s'", result);
> +
> +    if (g_cancellable_is_cancelled (ctx->cancellable)) {
> +        g_simple_async_result_set_error (ctx->result,
> +                                         MM_CORE_ERROR,
> +                                         MM_CORE_ERROR_CANCELLED,
> +                                         "Connection setup operation has been cancelled");
> +        detailed_connect_context_complete_and_free (ctx);
> +        return;
> +    }
> +
>      if (ctx->retries > 0) {
>          ctx->retries--;
>          mm_dbg ("Retrying status check in a second. %d retries left.",




More information about the ModemManager-devel mailing list