aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-04-12 23:17:45 -0500
committerDan Williams <dan@ioncontrol.co>2025-04-12 23:37:00 -0500
commit9e205f47847ab9ef5887b79c077ef8468d769af0 (patch)
treee0f1c76a6524264024f955970c1cd261c182f22e /src/mm-modem-helpers.c
parent66c3631a2f5352da7842436983b82d2bc0ecddda (diff)
modem-helpers: fix checking of CDMA/EVDO access technology
Missing ! for strncmp() meant the test was backwards and would erroneously report 1xRTT and EVDOr0 when those access technologies were not in use. Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 4f0c6248..fd958401 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -4160,11 +4160,11 @@ mm_string_to_access_tech (const gchar *string)
* are included in other strings too.
*/
len = strlen (string);
- if (strncmp (string, "EVDO", 4) && (len >= 4 && !isalnum (string[4])))
+ if (!strncmp (string, "EVDO", 4) && (len >= 4 && !isalnum (string[4])))
act |= MM_MODEM_ACCESS_TECHNOLOGY_EVDO0;
- if (strncmp (string, "CDMA", 4) && (len >= 4 && !isalnum (string[4])))
+ if (!strncmp (string, "CDMA", 4) && (len >= 4 && !isalnum (string[4])))
act |= MM_MODEM_ACCESS_TECHNOLOGY_1XRTT;
- if (strncmp (string, "CDMA-EVDO", 9) && (len >= 9 && !isalnum (string[9])))
+ if (!strncmp (string, "CDMA-EVDO", 9) && (len >= 9 && !isalnum (string[9])))
act |= MM_MODEM_ACCESS_TECHNOLOGY_1XRTT | MM_MODEM_ACCESS_TECHNOLOGY_EVDO0;
return act;