Don't go to modem state OFFLINE when entering SIM_STATE_READY

for some strange reason, SIM_STATE_READY wants to be entered only
some 30 seconds after our wavecom modems come up.  At this point,
cycling throug modem state OFFLINE would cause all existing and functional
interfaces to disappear.
This commit is contained in:
root 2016-01-12 19:15:50 +01:00
parent a168638337
commit a5d5dd4adf
2 changed files with 5 additions and 5 deletions

View File

@ -80,6 +80,7 @@ static void wind_notify(GAtResult *result, gpointer user_data)
int val;
const char *model;
enum ofono_vendor vendor = 0;
struct ofono_message_waiting *mw;
DBG("%p", modem);
@ -112,6 +113,9 @@ static void wind_notify(GAtResult *result, gpointer user_data)
ofono_netreg_create(modem, 0, "atmodem", chat);
ofono_call_meter_create(modem, 0, "atmodem", chat);
ofono_call_barring_create(modem, 0, "atmodem", chat);
mw = ofono_message_waiting_create(modem);
if (mw)
ofono_message_waiting_register(mw);
break;
case 8: /* network is lost */
case 10: /* reload status of SIM phonebook */
@ -280,13 +284,9 @@ static void wavecom_pre_sim(struct ofono_modem *modem)
static void wavecom_post_sim(struct ofono_modem *modem)
{
GAtChat *chat = ofono_modem_get_data(modem);
struct ofono_message_waiting *mw;
DBG("%p", modem);
mw = ofono_message_waiting_create(modem);
if (mw)
ofono_message_waiting_register(mw);
}
static struct ofono_modem_driver wavecom_driver = {

View File

@ -711,7 +711,7 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *user)
modem_change_state(modem, MODEM_STATE_PRE_SIM);
break;
case OFONO_SIM_STATE_READY:
modem_change_state(modem, MODEM_STATE_OFFLINE);
//modem_change_state(modem, MODEM_STATE_OFFLINE);
/* Modem is always online, proceed to online state. */
if (modem_is_always_online(modem) == TRUE)