atutil: Don't try parsing lac/ci when unregistered

This commit is contained in:
Denis Kenzior 2010-08-13 18:29:42 -05:00
parent d6f81ef17a
commit fa822e906e
1 changed files with 8 additions and 0 deletions

View File

@ -175,6 +175,10 @@ gboolean at_util_parse_reg_unsolicited(GAtResult *result, const char *prefix,
if (g_at_result_iter_next_number(&iter, &s) == FALSE)
return FALSE;
/* Some firmware will report bogus lac/ci when unregistered */
if (s != 1 && s != 5)
goto out;
switch (vendor) {
case OFONO_VENDOR_HUAWEI:
case OFONO_VENDOR_NOVATEL:
@ -240,6 +244,10 @@ gboolean at_util_parse_reg(GAtResult *result, const char *prefix,
if (g_at_result_iter_next_number(&iter, &s) == FALSE)
continue;
/* Some firmware will report bogus lac/ci when unregistered */
if (s != 1 && s != 5)
goto out;
switch (vendor) {
case OFONO_VENDOR_HUAWEI:
case OFONO_VENDOR_NOVATEL: