diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-10 13:58:54 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-14 07:05:22 +0200 |
commit | 2481d97d525b5e6a9d91d893892c72fcc91f7217 (patch) | |
tree | 4d26b858e335ee88febd79a79e293cd2672bb841 /src | |
parent | a5650ca091140def2070f0b631e398047313d5ba (diff) |
iface-modem-messaging: load initial SMS parts after having set default storages
We really want the 'mem3' storage set as soon as possible.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem-messaging.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index 77665c28..2a8415e6 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -675,8 +675,8 @@ static void interface_enabling_step (EnablingContext *ctx); typedef enum { ENABLING_STEP_FIRST, ENABLING_STEP_SETUP_SMS_FORMAT, - ENABLING_STEP_LOAD_INITIAL_SMS_PARTS, ENABLING_STEP_STORAGE_DEFAULTS, + ENABLING_STEP_LOAD_INITIAL_SMS_PARTS, ENABLING_STEP_SETUP_UNSOLICITED_EVENTS, ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS, ENABLING_STEP_LAST @@ -794,6 +794,23 @@ load_initial_sms_parts_ready (MMIfaceModemMessaging *self, } static void +set_default_storages_ready (MMIfaceModemMessaging *self, + GAsyncResult *res, + EnablingContext *ctx) +{ + GError *error = NULL; + + if (!mm_iface_modem_messaging_set_preferred_storages_finish (self, res, &error)) { + mm_dbg ("Couldn't set preferred storages: '%s'", error->message); + g_error_free (error); + } + + /* Go on with next step */ + ctx->step++; + interface_enabling_step (ctx); +} + +static void load_initial_sms_parts_from_storages (EnablingContext *ctx) { gboolean all_loaded = FALSE; @@ -829,23 +846,6 @@ load_initial_sms_parts_from_storages (EnablingContext *ctx) return; } -static void -set_default_storages_ready (MMIfaceModemMessaging *self, - GAsyncResult *res, - EnablingContext *ctx) -{ - GError *error = NULL; - - if (!mm_iface_modem_messaging_set_preferred_storages_finish (self, res, &error)) { - mm_dbg ("Couldn't set preferred storages: '%s'", error->message); - g_error_free (error); - } - - /* Go on with next step */ - ctx->step++; - interface_enabling_step (ctx); -} - VOID_REPLY_READY_FN (setup_unsolicited_events) static void @@ -911,16 +911,6 @@ interface_enabling_step (EnablingContext *ctx) /* Fall down to next step */ ctx->step++; - case ENABLING_STEP_LOAD_INITIAL_SMS_PARTS: - /* Allow loading the initial list of SMS parts */ - if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->load_initial_sms_parts && - MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->load_initial_sms_parts_finish) { - load_initial_sms_parts_from_storages (ctx); - return; - } - /* Fall down to next step */ - ctx->step++; - case ENABLING_STEP_STORAGE_DEFAULTS: /* Set storage defaults */ mm_dbg ("Setting default preferred storages..."); @@ -932,6 +922,16 @@ interface_enabling_step (EnablingContext *ctx) ctx); return; + case ENABLING_STEP_LOAD_INITIAL_SMS_PARTS: + /* Allow loading the initial list of SMS parts */ + if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->load_initial_sms_parts && + MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->load_initial_sms_parts_finish) { + load_initial_sms_parts_from_storages (ctx); + return; + } + /* Fall down to next step */ + ctx->step++; + case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->setup_unsolicited_events && |