diff options
author | Ben Chan <benchan@chromium.org> | 2012-10-31 21:23:42 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-11-02 08:19:30 +0100 |
commit | 02ef7d95474af3d13ce6905d7f8dcd3c8ce82608 (patch) | |
tree | 520aad5b98c09923a3a583982dfe0905598b8361 /src | |
parent | daf1a353c32e3bbf182e8c9c2948c35627c3111d (diff) |
iface-modem: load own numbers after SIM initialization
In 3GPP, own numbers are loaded from the SIM card, the loading of own
numbers should be scheduled after the SIM card is ready.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 082846e9..d25b03d2 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -3128,10 +3128,10 @@ typedef enum { INITIALIZATION_STEP_REVISION, INITIALIZATION_STEP_EQUIPMENT_ID, INITIALIZATION_STEP_DEVICE_ID, - INITIALIZATION_STEP_OWN_NUMBERS, INITIALIZATION_STEP_UNLOCK_REQUIRED, INITIALIZATION_STEP_UNLOCK_RETRIES, INITIALIZATION_STEP_SIM, + INITIALIZATION_STEP_OWN_NUMBERS, INITIALIZATION_STEP_SUPPORTED_MODES, INITIALIZATION_STEP_SUPPORTED_BANDS, INITIALIZATION_STEP_LAST @@ -3649,22 +3649,6 @@ interface_initialization_step (InitializationContext *ctx) /* Fall down to next step */ ctx->step++; - case INITIALIZATION_STEP_OWN_NUMBERS: - /* Own numbers is meant to be loaded only once during the whole - * lifetime of the modem. Therefore, if we already have them loaded, - * don't try to load them again. */ - if (mm_gdbus_modem_get_own_numbers (ctx->skeleton) == NULL && - MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers && - MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers_finish) { - MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers ( - ctx->self, - (GAsyncReadyCallback)load_own_numbers_ready, - ctx); - return; - } - /* Fall down to next step */ - ctx->step++; - case INITIALIZATION_STEP_UNLOCK_REQUIRED: /* Only check unlock required if we were previously not unlocked */ if (mm_gdbus_modem_get_unlock_required (ctx->skeleton) != MM_MODEM_LOCK_NONE) { @@ -3710,6 +3694,22 @@ interface_initialization_step (InitializationContext *ctx) return; } + case INITIALIZATION_STEP_OWN_NUMBERS: + /* Own numbers is meant to be loaded only once during the whole + * lifetime of the modem. Therefore, if we already have them loaded, + * don't try to load them again. */ + if (mm_gdbus_modem_get_own_numbers (ctx->skeleton) == NULL && + MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers && + MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers_finish) { + MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_own_numbers ( + ctx->self, + (GAsyncReadyCallback)load_own_numbers_ready, + ctx); + return; + } + /* Fall down to next step */ + ctx->step++; + case INITIALIZATION_STEP_SUPPORTED_MODES: g_assert (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_supported_modes != NULL); g_assert (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_supported_modes_finish != NULL); |