cdma: fix serving-system parsing for oddly-placed spaces
Sierra 580 returns "+CSS: 0, Z , 0" when not associated. Handle that.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user