diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-08 17:54:38 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-23 19:10:57 +0200 |
commit | 12c793e11c68dbf416090445ce7cf31042ee3fed (patch) | |
tree | 20bb11258a08b4d60856d78f6d8d5e5de627fbe7 | |
parent | ba95b71364f5f4075016b07af3bafa9e316c0987 (diff) |
iface-modem-cdma: ease the logic for plugins providing only detailed reg info
-rw-r--r-- | src/mm-iface-modem-cdma.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c index 32e87771..6ff8cd48 100644 --- a/src/mm-iface-modem-cdma.c +++ b/src/mm-iface-modem-cdma.c @@ -492,8 +492,19 @@ setup_registration_checks_ready (MMIfaceModemCdma *self, return; } - /* Go on to next step */ - ctx->step++; + /* Allow quick skip of all intermediate steps for those modems providing + * only a detailed registration state check */ + if (!ctx->skip_qcdm_call_manager_step && + !ctx->skip_qcdm_hdr_step && + !ctx->skip_at_cdma_service_status_step && + !ctx->skip_at_cdma1x_serving_system_step && + ctx->skip_detailed_registration_state) + /* Jump to the detailed registration state check */ + ctx->step = REGISTRATION_CHECK_STEP_DETAILED_REGISTRATION_STATE; + else + /* Go on to next step */ + ctx->step++; + registration_check_step (ctx); } @@ -883,6 +894,17 @@ mm_iface_modem_cdma_run_all_registration_checks (MMIfaceModemCdma *self, ctx->cdma1x_supported ? "yes" : "no", ctx->evdo_supported ? "yes" : "no"); + if (!MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_registration_checks && + !MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_call_manager_state && + !MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_hdr_state && + !MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_service_status && + !MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_cdma1x_serving_system && + MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_detailed_registration_state) + /* Special handling of the case of having only the detailed registration + * state callback */ + ctx->step = REGISTRATION_CHECK_STEP_DETAILED_REGISTRATION_STATE; + else + ctx->step = REGISTRATION_CHECK_STEP_FIRST; registration_check_step (ctx); } |