summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-03-30 08:20:38 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-03-30 08:20:38 +0200
commit374c028b16e00881d7da1d19490ef9be434bbb3e (patch)
tree42a2d035a9d70b76a81fd51b96758ef3f4980c1f
parent0d8cf160e5083b9f1433534b218490b7a1b5ce55 (diff)
downloadModemManager-374c028b16e00881d7da1d19490ef9be434bbb3e.tar.gz
broadband: reload operator and registration info only when enabling 3GPP location source
-rw-r--r--src/mm-broadband-modem.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index cdaf83f9c..c6f55dc7f 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -5727,13 +5727,15 @@ enable_location_gathering (MMIfaceModemLocation *self,
user_data,
enable_location_gathering);
- /* 3GPP modems need to re-run registration checks, so that we get up to date
- * LAC/CI location information. Note that we don't care for when the
- * registration checks get finished. */
- if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self))) {
- /* Re-run registration to get update LAC/CI */
+ /* 3GPP modems need to re-run registration checks when enabling the 3GPP
+ * location source, so that we get up to date LAC/CI location information.
+ * Note that we don't care for when the registration checks get finished.
+ */
+ if (source == MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI &&
+ mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self))) {
+ /* Reload registration to get LAC/CI */
mm_iface_modem_3gpp_run_all_registration_checks (MM_IFACE_MODEM_3GPP (self), NULL, NULL);
- /* Reload operator, to get MCC/MNC */
+ /* Reload operator to get MCC/MNC */
mm_iface_modem_3gpp_reload_current_operator (MM_IFACE_MODEM_3GPP (self));
}