Skip to content

Commit

Permalink
nat_traversal: handle return values for errors
Browse files Browse the repository at this point in the history
(cherry picked from commit 449d435)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent b3079e8 commit 59e263c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modules/nat_traversal/nat_traversal.c
Expand Up @@ -1573,6 +1573,10 @@ send_keepalive(NAT_Contact *contact)
lport = 0;
lproto = PROTO_NONE;
hostent = sip_resolvehost(&nat_ip, &lport, &lproto);
if(hostent==NULL) {
LM_ERR("sip resolve host failed\n");
return;
}
hostent2su(&dst.to, hostent, 0, nat_port);
dst.proto=PROTO_UDP;
dst.send_sock=contact->socket;
Expand Down Expand Up @@ -1900,7 +1904,9 @@ reply_filter(struct sip_msg *reply)
static str prefix = {NULL, 0};
str call_id;

parse_headers(reply, HDR_VIA2_F, 0);
if(parse_headers(reply, HDR_VIA2_F, 0)<0) {
LM_DBG("second via not parsed\n");
}
if (reply->via2)
return 1;

Expand Down

0 comments on commit 59e263c

Please sign in to comment.