aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-31 09:16:07 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-31 09:18:45 +0200
commit0ff904b3c501969d953c05834d897211b92a1324 (patch)
tree768907a14fd3c7a081f6f34ba2517d87bbef651e
parent737b6c2fc5d576c744aa7e5bb70b171bf3271e6f (diff)
bearer: set state as DISCONNECTING as soon as we cancel the connection sequence
Just when we request to cancel the connection we need to set the bearer as being disconnected, so that we do not end up overwriting connection cancellation requests. Reported by: Thieu Le <thieule@chromium.org>
-rw-r--r--src/mm-bearer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mm-bearer.c b/src/mm-bearer.c
index 3cce9483..6d30caea 100644
--- a/src/mm-bearer.c
+++ b/src/mm-bearer.c
@@ -466,6 +466,9 @@ mm_bearer_disconnect (MMBearer *self,
/* If currently connecting, try to cancel that operation, and wait to get
* disconnected. */
if (self->priv->status == MM_BEARER_STATUS_CONNECTING) {
+ /* Set ourselves as disconnecting */
+ bearer_update_status (self, MM_BEARER_STATUS_DISCONNECTING);
+
/* We MUST ensure that we get to DISCONNECTED */
g_cancellable_cancel (self->priv->connect_cancellable);
/* Note that we only allow to remove disconnected bearers, so should