diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-24 15:54:37 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-24 15:54:37 +0100 |
commit | 850a7737b809ad844fd91de1befa273a66cbe8d3 (patch) | |
tree | 54e3e5b162a8f4174940ba29d293a6a78bff1b18 | |
parent | 0380045aacb370c1a95e8119abbe1ffe8e5fb44b (diff) |
broadband-modem: fix reloading of operator code when enabling 3GPP location
When the 3GPP location is enabled, we need to reload the operator code
information, but only if the modem is registered in a 3GPP network.
Now, instead of looking at the global modem state value, look at the specific
3GPP registration state. This will avoid issues like:
* updating 3GPP operator info and the modem registered in a CDMA network.
* not updating the 3GPP operator info when the modem is registered in a 3GPP
network but not yet fully enabled (i.e. 'enabling').
-rw-r--r-- | src/mm-broadband-modem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 3178c38b..2e8dd8f0 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -6458,7 +6458,8 @@ enable_location_gathering (MMIfaceModemLocation *self, /* Reload registration to get LAC/CI */ mm_iface_modem_3gpp_run_registration_checks (MM_IFACE_MODEM_3GPP (self), NULL, NULL); /* Reload operator to get MCC/MNC */ - if (MM_BROADBAND_MODEM (self)->priv->modem_state >= MM_MODEM_STATE_REGISTERED) + if (MM_BROADBAND_MODEM (self)->priv->modem_3gpp_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || + MM_BROADBAND_MODEM (self)->priv->modem_3gpp_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) mm_iface_modem_3gpp_reload_current_operator (MM_IFACE_MODEM_3GPP (self), NULL, NULL); } |