Re: [MM PATCH] iface-modem: load own numbers after SIM initialization
- From: Aleksander Morgado <aleksander lanedo com>
- To: Ben Chan <benchan chromium org>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM PATCH] iface-modem: load own numbers after SIM initialization
- Date: Fri, 02 Nov 2012 09:05:09 +0100
On 01/11/12 05:23, Ben Chan wrote:
> In 3GPP, own numbers are loaded from the SIM card, the loading of own
> numbers should be scheduled after the SIM card is ready.
Pushed, thanks.
> ---
> 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 082846e..d25b03d 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);
>
--
Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]