[PATCH 2/2] Added SQLite history plugin
Bastian, Waldo
waldo.bastian at intel.com
Wed Apr 7 11:03:32 PDT 2010
> Hi Waldo,
>
> > > Hi Denis,
> > >
> > > Actually our apps listen for the IncomingMessage signal, and store the
> > > SMS in an internal database.
> > > At some point by design, a restart, a crash or other reasons, it may
> > > happen that apps are down while ofono and the modem are up, in that
> > > case we lose incoming messages.
> >
> > A similar lack of robustness exists at the modem API side as well, if
> oFono
> > crashes/runs out of battery after receiving the message from the modem
> > driver the message is lost. There is no provision in the SMS modem API
> to
> > signal back to the modem driver that the message has been successfully
> > stored on the APE.
>
> If oFono crashes/runs out of battery here the driver is gone along with
> oFono.
> Notifying it of anything is not going to help ;)
Currently the modem driver acknowledges the PDU right away. If there was a notification back to the modem driver, the PDU acknowledgement could be delayed till that point in time. If something bad happens in between, either the modem or the network can hold on to the PDU and redeliver once oFono is up and running again.
Looking at at_cmt_notify() the current implementation might have that affect already, as AT+CNMA is only send after calling ofono_sms_deliver_notify(). So as long as ofono_sms_deliver_notify() is handled synchronously and ensures that the PDU is stored one way or another before returning, it will work in case of a crash. (Would like to see assumptions like that called out in the code) That said, if your storage has issues (disk full?) there is currently no way to let the modem driver know that delivery was unsuccessful.
Cheers,
Waldo
More information about the ofono
mailing list