[PATCH] iface-modem: fix setting up signal quality retrieval logic

Aleksander Morgado aleksander at aleksander.es
Mon May 15 10:30:34 UTC 2017


If going directly e.g. from "Searching" to "Connecting", just setup
the signal quality retrieval logic right away, don't assume we always
go through "Registered" state before starting a connection.

Reported-by: <colin.helliwell at ln-systems.com>
---

Hey Colin,

Could you test this patch and see if you can still reproduce the issue?

Cheers!

---
 src/mm-iface-modem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 6ca5cf57..61d0f77b 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -1454,9 +1454,9 @@ __iface_modem_update_state_internal (MMIfaceModem *self,
                                                reason);
         }

-        /* If we go to registered state (from unregistered), setup signal
-         * quality and access technologies periodic retrieval */
-        if (new_state == MM_MODEM_STATE_REGISTERED &&
+        /* If we go to a registered/connected state (from unregistered), setup
+         * signal quality and access technologies periodic retrieval */
+        if (new_state >= MM_MODEM_STATE_REGISTERED &&
             old_state < MM_MODEM_STATE_REGISTERED) {
             periodic_signal_quality_check_enable (self);
             periodic_access_technologies_check_enable (self);
--
2.12.2


More information about the ModemManager-devel mailing list