[Devel] on handle_publish() errors

Juha Heinanen jh at tutpro.com
Sat Apr 28 17:58:17 CEST 2007


while reading presence code, another question came up.  when some errors
happen during handle_publish(), the function sends automatically
stateless error reply.  this is not, however, consistent, i.e., on some
other errors no error reply is sent.

in some cases when stateless reply is sent automatically
handle_publish() returns 0, so that script writer could know that either
function call succeeded or an error was already sent.  but this is not
consistent, because when event->evs_publ_handl(msg) is called, that call
may or may not have automatically generated error reply and there is no
way to know, because at least presence_xml publ_handl returns -1 on all
errors even when it had already generated error reply.

for simplicity, would it be better to always leave sending of error
replies to the script?  if i remember correctly, this has been a policy
in all other modules perhaps excluding tm.

-- juha



More information about the Devel mailing list