Module: kamailio Branch: master Commit: a25d17748a762ebce7f939afccfee76bcb759680 URL: https://github.com/kamailio/kamailio/commit/a25d17748a762ebce7f939afccfee76bcb759680
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: GitHub <nore...@github.com> Date: 2016-11-07T10:01:45+01:00 Merge pull request #847 from tverlaan/nathelper_force_socket nathelper: force socket if set --- Modified: modules/nathelper/nathelper.c --- Diff: https://github.com/kamailio/kamailio/commit/a25d17748a762ebce7f939afccfee76bcb759680.diff Patch: https://github.com/kamailio/kamailio/commit/a25d17748a762ebce7f939afccfee76bcb759680.patch --- diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c index 28508ca..2f02378 100644 --- a/modules/nathelper/nathelper.c +++ b/modules/nathelper/nathelper.c @@ -2079,9 +2079,12 @@ nh_timer(unsigned int ticks, void *timer_idx) } init_dest_info(&dst); hostent2su(&dst.to, he, 0, curi.port_no); + + if (force_socket) { + send_sock = force_socket; + } if (send_sock==0) { - send_sock=force_socket ? force_socket : - get_send_socket(0, &dst.to, PROTO_UDP); + send_sock = get_send_socket(0, &dst.to, PROTO_UDP); } if (send_sock == NULL) { LM_ERR("can't get sending socket\n"); _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev