diff options
Diffstat (limited to 'src/mm-iface-modem-3gpp.c')
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 78cf94d3..16ddce6d 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -173,11 +173,19 @@ handle_register_auth_ready (MMBaseModem *self, g_assert_not_reached (); break; - case MM_MODEM_STATE_LOCKED: + case MM_MODEM_STATE_INITIALIZING: g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, - "Cannot register modem: device locked"); + "Cannot register modem: " + "device not fully initialized yet"); + handle_register_context_free (ctx); + return; + + case MM_MODEM_STATE_LOCKED: + /* We should never have such request in LOCKED state + * (interface wasn't exported yet) */ + g_assert_not_reached (); break; case MM_MODEM_STATE_ENABLED: @@ -358,11 +366,19 @@ handle_scan_auth_ready (MMBaseModem *self, g_assert_not_reached (); break; - case MM_MODEM_STATE_LOCKED: + case MM_MODEM_STATE_INITIALIZING: g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, - "Cannot scan networks: device locked"); + "Cannot scan networks: " + "device not fully initialized yet"); + handle_scan_context_free (ctx); + return; + + case MM_MODEM_STATE_LOCKED: + /* We should never have such request in LOCKED state + * (interface wasn't exported yet) */ + g_assert_not_reached (); break; case MM_MODEM_STATE_DISABLED: |