[MM] [PATCH] bearer: deny disconnect request if there is a cancel outstanding



From: Thieu Le <thieule chromium org>

---
 src/mm-bearer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mm-bearer.c b/src/mm-bearer.c
index 3cce948..3b1be8c 100644
--- a/src/mm-bearer.c
+++ b/src/mm-bearer.c
@@ -450,7 +450,8 @@ mm_bearer_disconnect (MMBearer *self,
     }
 
     /* If already disconnecting, return error, don't allow a second request. */
-    if (self->priv->status == MM_BEARER_STATUS_DISCONNECTING) {
+    if (self->priv->status == MM_BEARER_STATUS_DISCONNECTING ||
+        self->priv->disconnect_signal_handler) {
         g_simple_async_result_set_error (
             simple,
             MM_CORE_ERROR,
-- 
1.7.7.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]