[sr-dev] git:master: tm: enable t_replicate() without any parameter

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 25 12:02:07 CEST 2014


Module: sip-router
Branch: master
Commit: c5b6b6021e75cd4e73f54f9131524b588709950c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c5b6b6021e75cd4e73f54f9131524b588709950c

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Jul 25 11:58:50 2014 +0200

tm: enable t_replicate() without any parameter

- r-uri or dst-uri will be used for sending out

---

 modules/tm/tm.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index ffc7c91..48076f3 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -361,6 +361,8 @@ static cmd_export_t cmds[]={
 	{"t_relay_to_sctp",       w_t_relay_to_sctp_uri,    0, 0,
 			REQUEST_ROUTE|FAILURE_ROUTE},
 #endif
+	{"t_replicate",        w_t_replicate_uri,       0, 0,
+			REQUEST_ROUTE},
 	{"t_replicate",        w_t_replicate_uri,       1, fixup_var_str_1,
 			REQUEST_ROUTE},
 	{"t_replicate",        w_t_replicate,           2, fixup_hostport2proxy,
@@ -1639,6 +1641,9 @@ inline static int w_t_replicate_uri(struct sip_msg  *msg ,
 {
 	str suri;
 
+	if(uri==NULL)
+		return t_replicate_uri(msg, NULL);
+
 	if(fixup_get_svalue(msg, (gparam_p)uri, &suri)!=0)
 	{
 		LM_ERR("invalid replicate uri parameter");




More information about the sr-dev mailing list