iface-modem-cdma: run all registration checks during CDMA interface enable
This commit is contained in:
@@ -889,6 +889,7 @@ static void interface_enabling_step (EnablingContext *ctx);
|
||||
|
||||
typedef enum {
|
||||
ENABLING_STEP_FIRST,
|
||||
ENABLING_STEP_RUN_ALL_REGISTRATION_CHECKS,
|
||||
ENABLING_STEP_LAST
|
||||
} EnablingStep;
|
||||
|
||||
@@ -942,6 +943,26 @@ mm_iface_modem_cdma_enable_finish (MMIfaceModemCdma *self,
|
||||
return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
|
||||
}
|
||||
|
||||
static void
|
||||
run_all_registration_checks_ready (MMIfaceModemCdma *self,
|
||||
GAsyncResult *res,
|
||||
EnablingContext *ctx)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (!mm_iface_modem_cdma_run_all_registration_checks_finish (self,
|
||||
res,
|
||||
&error)) {
|
||||
g_simple_async_result_take_error (ctx->result, error);
|
||||
enabling_context_complete_and_free (ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Go on to next step */
|
||||
ctx->step++;
|
||||
interface_enabling_step (ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
interface_enabling_step (EnablingContext *ctx)
|
||||
{
|
||||
@@ -950,6 +971,12 @@ interface_enabling_step (EnablingContext *ctx)
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case ENABLING_STEP_RUN_ALL_REGISTRATION_CHECKS:
|
||||
mm_iface_modem_cdma_run_all_registration_checks (ctx->self,
|
||||
(GAsyncReadyCallback)run_all_registration_checks_ready,
|
||||
ctx);
|
||||
return;
|
||||
|
||||
case ENABLING_STEP_LAST:
|
||||
/* We are done without errors! */
|
||||
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user