aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-01-07 22:19:02 +0100
committerAleksander Morgado <aleksander@lanedo.com>2013-01-07 22:25:46 +0100
commit959bb9d2ffb8bd7a3d701c21ec2cb58cab3717d9 (patch)
tree738af7ab066b54f5ea93a415bd8428d581784da0
parente93922197522067851f8cb4b7948ecae93e2843c (diff)
broadband-modem: launch the Firmware interface even on fatal errors
Even when there is a fatal error during initialization (e.g. missing PIN in a 3GPP modem), we should allow operations on the Firmware interface.
-rw-r--r--src/mm-broadband-modem.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 11bc279c..6563b4e9 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -7678,8 +7678,9 @@ iface_modem_initialize_ready (MMBroadbandModem *self,
MM_MODEM_STATE_FAILED,
MM_MODEM_STATE_CHANGE_REASON_UNKNOWN);
- /* Just jump to the last step */
- ctx->step = INITIALIZE_STEP_LAST;
+ /* Jump to the firmware step. We allow firmware switching even in failed
+ * state */
+ ctx->step = INITIALIZE_STEP_IFACE_FIRMWARE;
initialize_step (ctx);
return;
}
@@ -7873,7 +7874,8 @@ initialize_step (InitializeContext *ctx)
return;
case INITIALIZE_STEP_IFACE_SIMPLE:
- mm_iface_modem_simple_initialize (MM_IFACE_MODEM_SIMPLE (ctx->self));
+ if (ctx->self->priv->modem_state != MM_MODEM_STATE_FAILED)
+ mm_iface_modem_simple_initialize (MM_IFACE_MODEM_SIMPLE (ctx->self));
/* Fall down to next step */
ctx->step++;