Age | Commit message (Collapse) | Author |
|
mm_location_3gpp_new_from_string_variant
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
|
|
The libmm-glib library is LGPLv2+, not GPLv2+.
|
|
../libmm-glib/mm-location-3gpp.c: In function ‘mm_location_3gpp_new_from_string_variant’:
../libmm-glib/mm-location-3gpp.c:400:16: warning: unused variable ‘operator_code’ [-Wunused-variable]
400 | gchar *operator_code;
| ^~~~~~~~~~~~~
|
|
|
|
mm-location-3gpp.c: In function ‘mm_location_3gpp_get_mobile_country_code’:
mm-location-3gpp.c:139:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
139 | mcc[4] = '\0';
| ~~~~~~~^~~~~~
mm-location-3gpp.c:132:11: note: at offset 4 to object ‘mcc’ with size 4 declared here
132 | gchar mcc[4];
| ^~~
|
|
MMLocation3gpp provides MCC/MNC information as integers, so it can not
make distinction between operator codes such as XXX01 and XXX001.
This commit deprecates mm_location_3gpp_get_mobile_network_code() and
implements a new function mm_location_3gpp_get_operator_code() which
provides the MCC+MNC in string format.
The mm_location_3gpp_get_mobile_country_code() is still available as
returning the MCC as an integer does not have ambiguity issues.
|
|
The helper method returning a variant from a MMLocationGpsRaw would
return already a full variant reference instead of a floating one, so
we were really increasing the refcount when doing g_variant_ref_sink()
in the location interface.
Fix this by consolidating all helper methods in libmm-glib that return
variants from the different MMLocationXX objects, so that they all
return full variants instead of floating ones.
|
|
So that the GI scanner ignores them.
|
|
|
|
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
|
|
The "location area code" field is given in GSM/UMTS networks
exclusively. LTE networks use the concept of "tracking area code"
instead.
This patch updates the Location interface to Provide separate fields
for LAC and TAC, instead of giving TAC values in the LAC field.
|
|
|
|
It's pointless to have libmm-common around, just merge it into libmm-glib and
make ModemManager depend on libmm-glib directly. At the end, the non-common
stuff in libmm-glib is really minimal.
|