aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2022-03-16 11:57:53 +0100
committerAleksander Morgado <aleksander@aleksander.es>2022-03-16 11:04:06 +0000
commit2c8cfb47688da244e9312c291a250f7cceab02ff (patch)
tree45f030850d85005647e06ef5ac5ca41d4d1e37df /src/mm-broadband-modem.c
parent5ba67aff826a13580d6352ef82ba3a36ae7642fa (diff)
modem-helpers: improve and fix COPS=? numeric fields parsing
The numeric fields in the +COPS=? response were relying on a very weak parsing logic, assuming that they were single-digit numeric values and not using the common string to integer conversion utilities. This commit improves the conversion from the 3GPP/ETSI defined network availability and access technology values to the MM defined ones, providing enum-based matches even if the numeric values are the same. The commit also fixes the parsing of access technology values > 10, required to report 5G related values.
Diffstat (limited to 'src/mm-broadband-modem.c')
-rw-r--r--src/mm-broadband-modem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index cf7bc83e..f711e502 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -4496,6 +4496,7 @@ modem_3gpp_load_operator_code_finish (MMIfaceModem3gpp *self,
NULL, /* format */
&operator_code,
NULL, /* act */
+ self,
error))
return NULL;
@@ -4535,6 +4536,7 @@ modem_3gpp_load_operator_name_finish (MMIfaceModem3gpp *self,
NULL, /* format */
&operator_name,
NULL, /* act */
+ self,
error))
return NULL;