huawei: Switch to offline mode only if offline

This commit is contained in:
Martin Xu 2011-04-26 17:16:48 +08:00 committed by Denis Kenzior
parent d38fa75518
commit eaf6f64879
1 changed files with 2 additions and 1 deletions

View File

@ -217,7 +217,8 @@ static gboolean notify_sim_state(struct ofono_modem *modem,
*/
ofono_modem_set_powered(modem, TRUE);
g_at_chat_send(data->pcui, "AT+CFUN=5", none_prefix,
if (ofono_modem_get_online(modem) == FALSE)
g_at_chat_send(data->pcui, "AT+CFUN=5", none_prefix,
cfun_offline, modem, NULL);
return FALSE;