Skip to content

Commit

Permalink
tm: handle success return code by forward_request() for e2e ACK
Browse files Browse the repository at this point in the history
- forward_request() returns 0 on success, propagate 1 to config wrapper
  • Loading branch information
miconda committed Dec 22, 2017
1 parent 05509f3 commit 5211197
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/tm/t_funcs.c
Expand Up @@ -281,7 +281,7 @@ int t_relay_to( struct sip_msg *p_msg , struct proxy_l *proxy, int proto,
/* at this point if the msg is an ACK it is an e2e ACK and
e2e ACKs do not establish a transaction and are fwd-ed statelessly */
if ( p_msg->REQ_METHOD==METHOD_ACK) {
LM_DBG( "forwarding ACK statelessly \n");
LM_DBG("forwarding ACK statelessly\n");
if (proxy==0) {
init_dest_info(&dst);
dst.proto=proto;
Expand All @@ -302,7 +302,11 @@ int t_relay_to( struct sip_msg *p_msg , struct proxy_l *proxy, int proto,
proxy2su(&dst.to, proxy);
/* dst->send_sock not set, but forward_request will take care
* of it */
ret=forward_request( p_msg , 0, 0, &dst) ;
ret=forward_request(p_msg , 0, 0, &dst) ;
}
if (ret>=0) {
/* convert return code for cfg script */
ret=1;
}
goto done;
}
Expand Down

0 comments on commit 5211197

Please sign in to comment.