aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-03-12 17:44:44 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-03-17 09:19:17 +0000
commit3e58fbe547115bd875754806340b3bb39cc7b053 (patch)
tree716a6fa69c1d362b9d2b37f142b9b607c7e77ccb
parent952f416577b622e5a433492c889bb8ed613d1748 (diff)
base-bearer: ignore forced disconnections
If using PPP, ModemManager is never in charge of deciding when the connection is finished, because that would end up making ModemManager try to use the TTY port while pppd is still using it. When the modem goes unregistered for some time, we should not force the disconnection of the bearer object, we still need to wait for pppd to tell us the modem is disconnected. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/331
-rw-r--r--src/mm-base-bearer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c
index 8bba9bc6..6b8e6439 100644
--- a/src/mm-base-bearer.c
+++ b/src/mm-base-bearer.c
@@ -1325,6 +1325,11 @@ mm_base_bearer_disconnect_force (MMBaseBearer *self)
self->priv->status == MM_BEARER_STATUS_DISCONNECTED)
return;
+ if (self->priv->ignore_disconnection_reports) {
+ mm_obj_dbg (self, "disconnection should be forced but it's explicitly ignored");
+ return;
+ }
+
mm_obj_dbg (self, "forcing disconnection");
/* If currently connecting, try to cancel that operation. */