From 2c8cfb47688da244e9312c291a250f7cceab02ff Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 16 Mar 2022 11:57:53 +0100 Subject: 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. --- src/tests/test-modem-helpers.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tests/test-modem-helpers.c') diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index 1f040e8f..dc22fbde 100644 --- a/src/tests/test-modem-helpers.c +++ b/src/tests/test-modem-helpers.c @@ -961,6 +961,7 @@ test_cops_query_data (const CopsQueryData *item) &format, &operator, &act, + NULL, &error); g_assert_no_error (error); g_assert (result); -- cgit v1.2.3-70-g09d2