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:
@@ -514,9 +514,6 @@ serving_system_done (MMSerialPort *port,
|
|||||||
reply += 6;
|
reply += 6;
|
||||||
|
|
||||||
num = sscanf (reply, "%d , %c , %d", &class, &band, &sid);
|
num = sscanf (reply, "%d , %c , %d", &class, &band, &sid);
|
||||||
if (num != 3)
|
|
||||||
num = sscanf (reply, "%d,%c,%d", &class, &band, &sid);
|
|
||||||
|
|
||||||
if (num == 3) {
|
if (num == 3) {
|
||||||
/* Normalize */
|
/* Normalize */
|
||||||
class = CLAMP (class, 0, 4);
|
class = CLAMP (class, 0, 4);
|
||||||
|
Reference in New Issue
Block a user