Skip to content

Commit

Permalink
Merge pull request #847 from tverlaan/nathelper_force_socket
Browse files Browse the repository at this point in the history
nathelper: force socket if set
  • Loading branch information
miconda committed Nov 7, 2016
2 parents beda05b + b2ade6c commit a25d177
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/nathelper/nathelper.c
Expand Up @@ -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");
Expand Down

0 comments on commit a25d177

Please sign in to comment.