[sr-dev] git:master:52111974: tm: handle success return code by forward_request() for e2e ACK
Daniel-Constantin Mierla
miconda at gmail.com
Fri Dec 22 16:56:33 CET 2017
Module: kamailio
Branch: master
Commit: 52111974b4571e0562e8e731df80f48dbc504915
URL: https://github.com/kamailio/kamailio/commit/52111974b4571e0562e8e731df80f48dbc504915
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-22T16:54:50+01:00
tm: handle success return code by forward_request() for e2e ACK
- forward_request() returns 0 on success, propagate 1 to config wrapper
---
Modified: src/modules/tm/t_funcs.c
---
Diff: https://github.com/kamailio/kamailio/commit/52111974b4571e0562e8e731df80f48dbc504915.diff
Patch: https://github.com/kamailio/kamailio/commit/52111974b4571e0562e8e731df80f48dbc504915.patch
---
diff --git a/src/modules/tm/t_funcs.c b/src/modules/tm/t_funcs.c
index 0391ea3a33..42469cb432 100644
--- a/src/modules/tm/t_funcs.c
+++ b/src/modules/tm/t_funcs.c
@@ -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;
@@ -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;
}
More information about the sr-dev
mailing list