From 98fbd5a156a09d3dc46dbc52946a80450df13abb Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 15 May 2021 23:40:20 +0200 Subject: iface-modem-3gpp: don't assume operator code implies we're registered The modem may be camping in a forbidden network just for emergency services, and we'll be able to have a MCCMNC reported in that case, but this does not mean the modem is registered. So, don't consider that a valid registration flag during the new network registration request. --- src/mm-iface-modem-3gpp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 2a4028a6..68d00936 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -458,11 +458,11 @@ mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, /* If the modem is already registered and the last time it was asked * automatic registration, we're done */ if (!force_registration && - (current_operator_code || REG_STATE_IS_REGISTERED (reg_state)) && + REG_STATE_IS_REGISTERED (reg_state) && !priv->manual_registration) { mm_obj_dbg (self, "already registered automatically in network '%s'," " automatic registration not launched...", - current_operator_code); + current_operator_code ? current_operator_code : "unknown"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; -- cgit v1.2.3-70-g09d2