aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2017-04-03 14:50:01 -0500
committerDan Williams <dcbw@redhat.com>2017-04-06 17:09:39 -0500
commit8c04cc036782dab0e80c1f2314baa3376eecad02 (patch)
tree770418f0af568b18d1119739e682cded8f9b8aa3
parent665e22791818b51ce48d93febf7ced7302e7a2d3 (diff)
telit: fix AT+SERVICE 3GPP2 access technology reporting
Looks like a C&P error from the AT#PSNT codepath; all the docs I can find indicate that AT+SERVICE returns only an integer and no commas: <debug> (ttyUSB2): --> 'AT+SERVICE?<CR>' <debug> (ttyUSB2): <-- '<CR><LF>+SERVICE: 3<CR><LF><CR><LF>OK<CR><LF>' <debug> Couldn't refresh access technologies: 'Failed to parse +SERVICE response: '+SERVICE: 3''
-rw-r--r--plugins/telit/mm-broadband-modem-telit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c
index 8b873106..fb169fd2 100644
--- a/plugins/telit/mm-broadband-modem-telit.c
+++ b/plugins/telit/mm-broadband-modem-telit.c
@@ -828,7 +828,7 @@ response_processor_service_ignore_at_errors (MMBaseModem *self,
GVariant **result,
GError **result_error)
{
- const gchar *service, *mode;
+ const gchar *service;
if (error) {
/* Ignore AT errors (ie, ERROR or CMx ERROR) */
@@ -838,9 +838,8 @@ response_processor_service_ignore_at_errors (MMBaseModem *self,
}
service = mm_strip_tag (response, "+SERVICE:");
- mode = strchr (service, ',');
- if (mode) {
- switch (atoi (++mode)) {
+ if (service) {
+ switch (atoi (service)) {
case 1:
*result = g_variant_new_uint32 (MM_MODEM_ACCESS_TECHNOLOGY_1XRTT);
return TRUE;