aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-01-04 18:36:55 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:45 +0100
commit44289da5316d8a90d6016d181d828d754a4e2096 (patch)
treecceceb487569cfdcdeb8ba0019168cbcd684188a /src
parent11038be07f9ccc00f8413c85c6ab912467a680f7 (diff)
iface-modem-cdma: run all registration checks during CDMA interface enable
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem-cdma.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c
index b079b33f..0bad7faa 100644
--- a/src/mm-iface-modem-cdma.c
+++ b/src/mm-iface-modem-cdma.c
@@ -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;
@@ -943,6 +944,26 @@ mm_iface_modem_cdma_enable_finish (MMIfaceModemCdma *self,
}
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)
{
switch (ctx->step) {
@@ -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);