iface-modem: allow changing capabilities in every state

Same as done with the firmware switching, we allow capabilities changing even
if the modem is in FAILED state, e.g. to switch from 3GPP to 3GPP2 mode.
This commit is contained in:
Aleksander Morgado
2013-05-31 09:56:30 +02:00
parent f09eff633c
commit b41278c423

View File

@@ -4370,6 +4370,14 @@ interface_initialization_step (InitializationContext *ctx)
} }
case INITIALIZATION_STEP_LAST: case INITIALIZATION_STEP_LAST:
/* Setting capabilities allowed also in FAILED state. Just imagine a
* 3GPP+3GPP2 modem in 3GPP-only mode without SIM, we should allow
* changing caps to 3GPP2, which doesn't require SIM */
g_signal_connect (ctx->skeleton,
"handle-set-current-capabilities",
G_CALLBACK (handle_set_current_capabilities),
ctx->self);
if (ctx->fatal_error) { if (ctx->fatal_error) {
g_simple_async_result_take_error (ctx->result, ctx->fatal_error); g_simple_async_result_take_error (ctx->result, ctx->fatal_error);
ctx->fatal_error = NULL; ctx->fatal_error = NULL;
@@ -4408,10 +4416,6 @@ interface_initialization_step (InitializationContext *ctx)
"handle-factory-reset", "handle-factory-reset",
G_CALLBACK (handle_factory_reset), G_CALLBACK (handle_factory_reset),
ctx->self); ctx->self);
g_signal_connect (ctx->skeleton,
"handle-set-current-capabilities",
G_CALLBACK (handle_set_current_capabilities),
ctx->self);
g_signal_connect (ctx->skeleton, g_signal_connect (ctx->skeleton,
"handle-set-current-bands", "handle-set-current-bands",
G_CALLBACK (handle_set_current_bands), G_CALLBACK (handle_set_current_bands),