All of lore.kernel.org
 help / color / mirror / Atom feed
* [mmsd] Error handling while receiving message
@ 2012-03-23  9:40 Ronald Tessier
  2012-03-23 18:48 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ronald Tessier @ 2012-03-23  9:40 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Hi,

I'm working on handling errors while receiving an MMS (listed in TODO as 
: "Error cases should handled and reported to the application layer." in 
MMS Reception section).

What kind of error do you want to report to the application : generic 
MMS reception error such as "Unable to decode message", "Unable to 
download message" ... or more accurate error (error code, "HTTP error 
XXX", "Communication error while downloading message"... ) ?

Since the reception is automatically performed, there is no D-Bus reply 
msg to use to send error back to the application !
I cannot always handle the error in 'Message' interface since the D-Bus 
object (associated to the message) does not exist before having 
downloaded the entire message. More generally, how to handle errors that 
occurs before the message D-Bus object has been published ?
Should I define a new signal ("MessageError") in 'Service' interface to 
report errors ?

What kind of information the reported error should contain ? the sender 
(if the notification has been decoded), the meta file path (if 
available) ... ?

Thanks in advance,
Regards,

Ronald

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [mmsd] Error handling while receiving message
  2012-03-23  9:40 [mmsd] Error handling while receiving message Ronald Tessier
@ 2012-03-23 18:48 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2012-03-23 18:48 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

Hi Ronald,

> I'm working on handling errors while receiving an MMS (listed in TODO as 
> : "Error cases should handled and reported to the application layer." in 
> MMS Reception section).
> 
> What kind of error do you want to report to the application : generic 
> MMS reception error such as "Unable to decode message", "Unable to 
> download message" ... or more accurate error (error code, "HTTP error 
> XXX", "Communication error while downloading message"... ) ?
> 
> Since the reception is automatically performed, there is no D-Bus reply 
> msg to use to send error back to the application !
> I cannot always handle the error in 'Message' interface since the D-Bus 
> object (associated to the message) does not exist before having 
> downloaded the entire message. More generally, how to handle errors that 
> occurs before the message D-Bus object has been published ?
> Should I define a new signal ("MessageError") in 'Service' interface to 
> report errors ?
> 
> What kind of information the reported error should contain ? the sender 
> (if the notification has been decoded), the meta file path (if 
> available) ... ?

as a general statement, I would prefer that we have proper error
recovery internally. So for errors that we can deal with or just retry,
we should not tell the application anything. And just try to fix it next
time we can. For example failed download because of network outage, lets
just try again next time.

That should take care of most errors, for invalid messages, I am fine
with just printing a log message and ignoring the message. If the other
side sends us invalid data, we can not do much about it anyway. Invalid
is invalid. And for security purposes we should just drop it.

Regards

Marcel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-23 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-23  9:40 [mmsd] Error handling while receiving message Ronald Tessier
2012-03-23 18:48 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.