option: handle response specifying automatic mode

Option modems may reply '_OPSYS: 5,2' to report automatic mode being used.
This commit is contained in:
Aleksander Morgado
2012-03-24 19:02:01 +01:00
parent 41a592b535
commit 43cdb25eb1

View File

@@ -102,6 +102,10 @@ load_allowed_modes_finish (MMIfaceModem *self,
*allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
*preferred = MM_MODEM_MODE_3G;
return TRUE;
case 5: /* any */
*allowed = (MM_MODEM_MODE_CS | MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
*preferred = MM_MODEM_MODE_NONE;
return TRUE;
default:
break;
}
@@ -109,7 +113,7 @@ load_allowed_modes_finish (MMIfaceModem *self,
g_set_error (error,
MM_CORE_ERROR,
MM_CORE_ERROR_FAILED,
"Couldn't unexpected OSSYS response: '%s'",
"Couldn't parse unexpected OSSYS response: '%s'",
response);
return FALSE;
}