aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-09-25 16:06:38 +0200
committerAleksander Morgado <aleksander@aleksander.es>2018-09-25 19:21:00 +0200
commit0ca95254ae507caddebe45f6ee6e230a99e82bfc (patch)
treee415340dcd598ce60bf1cabdecebcd2803a49492 /src
parent4d16eec5fbbe16e92dd25bea420fb8c503e520ec (diff)
libmm-glib,location-3gpp: don't ignore location updates when MNC is 0
E.g. China Mobile (MCC 460, MNC 0). $ mmcli -m toby --location-get /org/freedesktop/ModemManager1/Modem/0 ------------------------- 3GPP location | Mobile country code: '460' | Mobile network code: '0' | Location area code: '6188' | Cell ID: '40955' ------------------------- GPS NMEA traces | Not available ------------------------- Raw GPS | Not available ------------------------- CDMA BS | Not available
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem-location.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c
index 88fd2bf8..2ccb6434 100644
--- a/src/mm-iface-modem-location.c
+++ b/src/mm-iface-modem-location.c
@@ -383,15 +383,8 @@ mm_iface_modem_location_3gpp_clear (MMIfaceModemLocation *self)
return;
if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) {
- guint changed = 0;
-
g_assert (ctx->location_3gpp != NULL);
- changed += mm_location_3gpp_set_location_area_code (ctx->location_3gpp, 0);
- changed += mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, 0);
- changed += mm_location_3gpp_set_cell_id (ctx->location_3gpp, 0);
- changed += mm_location_3gpp_set_mobile_country_code (ctx->location_3gpp, 0);
- changed += mm_location_3gpp_set_mobile_network_code (ctx->location_3gpp, 0);
- if (changed)
+ if (mm_location_3gpp_reset (ctx->location_3gpp))
notify_3gpp_location_update (self, skeleton, ctx->location_3gpp);
}