diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-10 13:19:28 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-10 13:21:05 +0100 |
commit | 97f9679b701e0d90999b8e441a8f2b4ed5ae27f3 (patch) | |
tree | 1937c6a8ce6f600f39e9e62f3c47883c187e72f3 /src/mm-iface-modem-location.c | |
parent | 33b1962615febea5c34f0fbddc24eab8de5a9c7a (diff) |
iface-modem-location: assert if rewriting a variant during iteration
This should never ever happen, so assert
Diffstat (limited to 'src/mm-iface-modem-location.c')
-rw-r--r-- | src/mm-iface-modem-location.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index 83915063..6108106a 100644 --- a/src/mm-iface-modem-location.c +++ b/src/mm-iface-modem-location.c @@ -128,15 +128,19 @@ build_location_dictionary (GVariant *previous, while (g_variant_iter_next (&iter, "{uv}", &source, &value)) { switch (source) { case MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI: + g_assert (!location_3gpp_value); location_3gpp_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_NMEA: + g_assert (!location_gps_nmea_value); location_gps_nmea_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_RAW: + g_assert (!location_gps_raw_value); location_gps_raw_value = value; break; case MM_MODEM_LOCATION_SOURCE_CDMA_BS: + g_assert (!location_cdma_bs_value); location_cdma_bs_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: |