|
|
70b171 |
From 811e7a71fe574884e454807fb59393acc182555c Mon Sep 17 00:00:00 2001
|
|
|
70b171 |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
70b171 |
Date: Fri, 3 May 2019 18:45:22 +0200
|
|
|
70b171 |
Subject: [PATCH 1/4] base-bearer: fix check for cancellation
|
|
|
70b171 |
|
|
|
70b171 |
If we cancel connect_cancellable, the connect task will return a
|
|
|
70b171 |
G_IO_ERROR_CANCELLED. We may need to do some cleanup (like, disconnect
|
|
|
70b171 |
if the connection went far enough to actually start the network
|
|
|
70b171 |
connection), thus it's important we check for cancellation correctly.
|
|
|
70b171 |
---
|
|
|
70b171 |
src/mm-base-bearer.c | 5 ++---
|
|
|
70b171 |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
70b171 |
|
|
|
70b171 |
diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c
|
|
|
70b171 |
index 854fbc2..e1dd989 100644
|
|
|
70b171 |
--- a/src/mm-base-bearer.c
|
|
|
70b171 |
+++ b/src/mm-base-bearer.c
|
|
|
70b171 |
@@ -576,9 +576,8 @@ connect_ready (MMBaseBearer *self,
|
|
|
70b171 |
mm_dbg ("Couldn't connect bearer '%s': '%s'",
|
|
|
70b171 |
self->priv->path,
|
|
|
70b171 |
error->message);
|
|
|
70b171 |
- if (g_error_matches (error,
|
|
|
70b171 |
- MM_CORE_ERROR,
|
|
|
70b171 |
- MM_CORE_ERROR_CANCELLED)) {
|
|
|
70b171 |
+ if ( g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_CANCELLED)
|
|
|
70b171 |
+ || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
|
|
70b171 |
/* Will launch disconnection */
|
|
|
70b171 |
launch_disconnect = TRUE;
|
|
|
70b171 |
} else
|
|
|
70b171 |
--
|
|
|
70b171 |
1.8.3.1
|
|
|
70b171 |
|