Read messages left over in ME storage on startup.
Andrzej Zaborowski
andrew.zaborowski at intel.com
Fri Sep 4 22:16:12 PDT 2009
Hi,
2009/8/25 Denis Kenzior <denkenz at gmail.com>:
> On Fri, Aug 21, 2009 at 9:35 PM, Andrzej Zaborowski
> <andrew.zaborowski at intel.com> wrote:
>> On modems that don't support +CMT (or for class 2 SMSes) the messages are
>> stored in the modem and then read and deleted from there in two separate
>> steps with no warranty that deletion succeeds or (more likely) power is
>> cut before the deletion happens. Over time the memory may become full
>> and if we don't want to deal with this condition we need to check on
>> startup if there are messages we haven't deleted.
>>
>> We can't differentiate between those messages and those the user already
>> had on the SIM / modem before installing ofono or switching phones, so we
>> might want to deliver messages with REC READ status with some kind of
>> indication that these are potentially old so the UI doesn't emit spurious
>> alerts. We don't do this now and just deliver as usual.
>
>> + hexpdu = g_at_result_pdu(result);
>
> You can't use g_at_result_pdu on messages that haven't been flagged to
> expect a PDU. Right now this only works for g_at_chat_register style
> unsolicited notifications for which the 'expect_pdu' has been set to TRUE.
Right, I now changed it to use the new g_at_chat_send_pdu_listing
function (I had an almost identical change in my tree) and tested with
non-empty SMS store on card.
>> ofono_sms_manager_register(modem, &ops);
>> +
>> + /* Inspect and free the incoming SMS storage */
>> + if (at->sms->incoming == MT_STORE)
>> + at_cmgl_set_cpms(modem, ME_STORE);
>> + else
>> + at_cmgl_set_cpms(modem, at->sms->incoming);
>> }
>
> It might be worth to scan both ME & SM stores. Especially since MT
> literally means combined SM + ME store.
We already do this, in at_cmgl_done after listing ME_STORE we repeat
the commands for SM_STORE.
Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Read-messages-left-over-in-ME-storage-on-startup.patch
Type: text/x-patch
Size: 5237 bytes
Desc: not available
URL: <http://lists.ofono.org/pipermail/ofono/attachments/20090905/a68fa51c/attachment.bin>
More information about the ofono
mailing list