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
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to