From 3e58fbe547115bd875754806340b3bb39cc7b053 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 12 Mar 2021 17:44:44 +0100 Subject: [PATCH] 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 --- src/mm-base-bearer.c | 5 +++++ 1 file changed, 5 insertions(+) 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. */