diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2014-06-16 16:22:51 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-06-16 18:03:38 +0200 |
commit | ed623f662849a9b784280bcb7e6500b962a7e041 (patch) | |
tree | 36248b818ec37b7b1f43d96645e80b9050fa8a2f | |
parent | 6e490944d07061ca15837963552d023807958feb (diff) |
iface-modem-messaging: don't skip MT storage when reading if it's the only one
-rw-r--r-- | src/mm-iface-modem-messaging.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index 11018624..06770f39 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -808,10 +808,12 @@ load_initial_sms_parts_from_storages (EnablingContext *ctx) if (!storage_ctx->supported_mem1 || ctx->mem1_storage_index >= storage_ctx->supported_mem1->len) all_loaded = TRUE; - /* We'll skip the 'MT' storage, as that is a combination of 'SM' and 'ME' */ - else if (g_array_index (storage_ctx->supported_mem1, - MMSmsStorage, - ctx->mem1_storage_index) == MM_SMS_STORAGE_MT) { + /* We'll skip the 'MT' storage, as that is a combination of 'SM' and 'ME'; but only if + * this is not the only one in the list. */ + else if ((g_array_index (storage_ctx->supported_mem1, + MMSmsStorage, + ctx->mem1_storage_index) == MM_SMS_STORAGE_MT) && + (storage_ctx->supported_mem1->len > 1)) { ctx->mem1_storage_index++; if (ctx->mem1_storage_index >= storage_ctx->supported_mem1->len) all_loaded = TRUE; |