diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-04-04 16:59:19 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-04-04 16:59:19 +0200 |
commit | bc41dd40cdd8db66c1929465df9b8babf1bd0af1 (patch) | |
tree | 9c923789cbc3864068f8832363050e698927089d | |
parent | 0d20a7c85a3b287cf68372eef756194f760a23f7 (diff) | |
download | ModemManager-bc41dd40cdd8db66c1929465df9b8babf1bd0af1.tar.gz |
broadband-bearer: ensure we close the port even if we got cancelled
When there is an error in the connection attempt we need to close the dialling
port ourselves. In the case where we got an error and we also got cancelled,
we need to make sure that the port gets closed.
-rw-r--r-- | src/mm-broadband-bearer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 2e4be249a..c34867d33 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -501,6 +501,9 @@ extended_error_ready (MMBaseModem *modem, { const gchar *result; + /* Close the dialling port as we got an error */ + mm_serial_port_close (MM_SERIAL_PORT (ctx->dial_port)); + /* If cancelled, complete */ if (dial_3gpp_context_complete_and_free_if_cancelled (ctx)) return; @@ -520,9 +523,6 @@ extended_error_ready (MMBaseModem *modem, ctx->saved_error = NULL; - /* Close the dialling port as we got an error */ - mm_serial_port_close (MM_SERIAL_PORT (ctx->dial_port)); - /* Done with errors */ dial_3gpp_context_complete_and_free (ctx); } |