Commit 0b296676 authored by Chris T's avatar Chris T

Clean up Suspend code.

parent c1e0cb96
......@@ -525,6 +525,7 @@ pur_mm_get_modem_state (void)
mms_error("ModemManagerPlugin(): MM_MODEM_STATE_DISABLED");
mms_error("ModemManagerPlugin(): Turning on Modem....");
mm_modem_set_power_state_sync (modem->modem, MM_MODEM_POWER_STATE_ON, NULL, &error);
pur_mm_state (PUR_MM_STATE_MODEM_DISABLED);
return FALSE;
default:
break;
......@@ -536,17 +537,18 @@ pur_mm_get_modem_state (void)
return TRUE;
}
static void state_changed_cb(MMModem *cb_modem,
MMModemState old,
MMModemState new,
MMModemStateChangeReason reason)
static void
state_changed_cb(MMModem *cb_modem,
MMModemState old,
MMModemState new,
MMModemStateChangeReason reason)
{
mms_error("ModemManagerPlugin(): State Change: Old: %d New: %d, Reason: %d", old, new, reason);
if (new >= MM_MODEM_STATE_CONNECTING) {
mms_error("ModemManagerPlugin(): Modem is ready");
g_signal_handler_disconnect (modem->gdbus_modem,
modem->modem_state_watch_id);
pur_mm_state (PUR_MM_STATE_MODEM_FOUND);
mms_error("ModemManagerPlugin(): State Change: Old State: %d New State: %d, Reason: %d", old, new, reason);
if (new >= MM_MODEM_STATE_ENABLED) {
mms_error("ModemManagerPlugin(): Modem is ready");
g_signal_handler_disconnect (modem->gdbus_modem,
modem->modem_state_watch_id);
pur_mm_state (PUR_MM_STATE_MODEM_FOUND);
}
}
......
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