[PATCH] novatel-lte: check if a connect operation has been cancelled
Ben Chan
benchan at chromium.org
Tue Aug 27 00:15:39 PDT 2013
---
plugins/novatel/mm-broadband-bearer-novatel-lte.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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.",
--
1.8.3.1
More information about the ModemManager-devel
mailing list