aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-07-22 07:42:05 -0400
committerDan Williams <dcbw@redhat.com>2009-07-22 07:42:05 -0400
commitc307606e747faf1c736eade8c839a7a3ca7fa213 (patch)
treef8e2c688d606913744c2b5feda922606f6177c4d
parent354785f440e3b9939606710264c552fb99b3637f (diff)
cdma: fix serving-system parsing for oddly-placed spaces
Sierra 580 returns "+CSS: 0, Z , 0" when not associated. Handle that.
-rw-r--r--src/mm-generic-cdma.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mm-generic-cdma.c b/src/mm-generic-cdma.c
index 64ea761a..6c6cb763 100644
--- a/src/mm-generic-cdma.c
+++ b/src/mm-generic-cdma.c
@@ -513,10 +513,7 @@ serving_system_done (MMSerialPort *port,
if (strstr (reply, "+CSS: "))
reply += 6;
- num = sscanf (reply, "%d, %c, %d", &class, &band, &sid);
- if (num != 3)
- num = sscanf (reply, "%d,%c,%d", &class, &band, &sid);
-
+ num = sscanf (reply, "%d , %c , %d", &class, &band, &sid);
if (num == 3) {
/* Normalize */
class = CLAMP (class, 0, 4);