diff options
author | Ben Chan <benchan@chromium.org> | 2014-02-28 12:30:18 -0800 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-03-03 11:18:23 +0100 |
commit | f20724ec3f5bb4ad9821059021a5d4ee1d74528c (patch) | |
tree | 7f6af650a9319e53010534beec8a095c1b61a138 | |
parent | 17bf3f8578c2e4a43d81630071daf15a5f374254 (diff) |
iface-modem: allow setting power state to OFF when modem is in FAILED state
-rw-r--r-- | src/mm-iface-modem.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index c0241977..36e42e7f 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -4667,6 +4667,15 @@ interface_initialization_step (InitializationContext *ctx) "handle-set-current-capabilities", G_CALLBACK (handle_set_current_capabilities), ctx->self); + /* Allow setting the power state to OFF even when the modem is in the + * FAILED state as this operation does not necessarily depend on the + * presence of a SIM. handle_set_power_state_auth_ready already ensures + * that the power state can only be set to OFF when the modem is in the + * FAILED state. */ + g_signal_connect (ctx->skeleton, + "handle-set-power-state", + G_CALLBACK (handle_set_power_state), + ctx->self); /* Allow the reset and factory reset operation in FAILED state to rescue the modem. * Also, for a modem that doesn't support SIM hot swapping, a reset is needed to * force the modem to detect the newly inserted SIM. */ @@ -4706,10 +4715,6 @@ interface_initialization_step (InitializationContext *ctx) G_CALLBACK (handle_enable), ctx->self); g_signal_connect (ctx->skeleton, - "handle-set-power-state", - G_CALLBACK (handle_set_power_state), - ctx->self); - g_signal_connect (ctx->skeleton, "handle-set-current-bands", G_CALLBACK (handle_set_current_bands), ctx->self); |