Commit eb57387e authored by Chris T's avatar Chris T

Waypoint to Getting suspend working.

parent 82787038
......@@ -471,7 +471,7 @@ cb_get_sim_ready (MMModem *MMmodem,
modem->imsi = mm_sim_get_imsi (modem->sim);
mms_error ("Got SIM Path: %s Identifier: %s, imsi: %s", mm_sim_get_path (modem->sim),
mms_error("ModemManagerPlugin(): Got SIM Path: %s Identifier: %s, imsi: %s", mm_sim_get_path (modem->sim),
mm_sim_get_identifier (modem->sim), modem->imsi);
}
......@@ -489,14 +489,38 @@ pur_mm_get_modem_state (void)
pur_mm_state (PUR_MM_STATE_NO_MESSAGING_MODEM);
return FALSE;
}
state = mm_modem_get_state (modem->modem);
if (state < MM_MODEM_STATE_ENABLED) {
pur_mm_state (PUR_MM_STATE_MODEM_DISABLED);
return FALSE;
mms_error("ModemManagerPlugin(): Modem Initializing....");
sleep(3);
while (state < MM_MODEM_STATE_DISABLED) {
mms_error("ModemManagerPlugin(): Something May be wrong with the modem, checking....");
switch (state) {
case MM_MODEM_STATE_FAILED:
mms_error("ModemManagerPlugin(): MM_MODEM_STATE_FAILED");
pur_mm_state (PUR_MM_STATE_MODEM_DISABLED);
return FALSE;
case MM_MODEM_STATE_UNKNOWN:
mms_error("ModemManagerPlugin(): MM_MODEM_STATE_UNKNOWN");
pur_mm_state (PUR_MM_STATE_MODEM_DISABLED);
return FALSE;
case MM_MODEM_STATE_LOCKED:
mms_error("ModemManagerPlugin(): MM_MODEM_STATE_FAILED");
pur_mm_state (PUR_MM_STATE_MODEM_DISABLED);
return FALSE;
case MM_MODEM_STATE_INITIALIZING:
/* Give the modem a second to initialize*/
state = mm_modem_get_state (modem->modem);
break;
default:
break;
}
}
mms_error("Modem is ready...");
} else {
mms_error("Done with While Loop: MM_MODEM_STATE_ENABLED");
}
return TRUE;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment