[Kamailio-Devel] Any solution for pua_usrloc when Kamailio is restarted?
Iñaki Baz Castillo
ibc at aliax.net
Thu Mar 26 13:54:19 CET 2009
2009/3/26 Daniel-Constantin Mierla <miconda at gmail.com>:
> Your solution is good anyhow, for those enabling pua_usrloc for first time
> -- there will be usrloc updates. If you get a patch, I can review.
Please let me know if my current idea could be valid:
'pua/send_publish.c' contains in function 'send_publish()':
------------------
if(publ->body== NULL)
{
LM_ERR("New PUBLISH and no body found- invalid
request\n");
return -1;
}
------------------
and 'pua_usrloc/ul_publish.c' contains in funcion 'ul_publish()':
------------------
if(pua_send_publish(publ)< 0)
{
LM_ERR("while sending publish\n");
}
------------------
The idea is:
'pua/send_publish.c' - 'send_publish()':
------------------
if(publ->body== NULL)
{
LM_ERR("New PUBLISH and no body found- invalid
request\n");
return -10; // NOTE THIS UNIQUE VALUE (could
be a #define)
}
------------------
'pua_usrloc/ul_publish.c' - 'ul_publish()':
------------------
if((error=pua_send_publish(publ))< 0)
{
LM_ERR("while sending publish\n");
if (error == -10) {
# act as if an INSERT callback occurred (generate
the body) and re-send.
}
}
------------------
Your opinion please? Thanks a lot.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the Devel
mailing list