diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-05-15 23:40:20 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-05-15 21:55:28 +0000 |
commit | 98fbd5a156a09d3dc46dbc52946a80450df13abb (patch) | |
tree | 544d57e2631dddffcc70d90918031bf83b78cdc0 | |
parent | af756a1bf7d8005f7bb4d7bfcccf5133ce57b54d (diff) |
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.
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |