[sr-dev] Is there a sense in calling run_onsend() after the msg_send() function?

Lucian Balaceanu lucian.balaceanu at 1and1.ro
Mon Aug 4 15:57:48 CEST 2014


Hi,

I am currently trying to understand some kamailio code and came across 
this construct inside do_forward_reply() function (code in italics is 
not part of upstream kamailio):

*do_forward_reply(struct sip_msg* msg, int mode){*
     ...
     ...
     apply_force_send_socket(&dst, msg);

     if (msg_send(&dst, new_buf, new_len)<0)
     {
         STATS_RPL_FWD_DROP();
         goto error;
     }
/*    ...
     dst.send_sock=get_send_socket(msg, &dst.to, dst.proto);
     ...
     run_onsend(msg, &dst, new_buf, new_len);*/
*}*

Is there really a sense in calling run_onsend() after the msg_send() 
function? In my understanding (based on onsend_route uasge) run_onsend() 
is used to make some last minute changes before a message is sent to a 
destination.

Thank you,
Lucian Balaceanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140804/b31bccda/attachment.html>


More information about the sr-dev mailing list