[sr-dev] git:3.2: tm: free path if set first time in a branch route

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 22 12:16:13 CET 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Nov 17 23:14:32 2011 +0100

tm: free path if set first time in a branch route
(cherry picked from commit 7b612d999e061d05b60054e7749052d0abdf514c)

---

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

diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 210601d..26bf7f3 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -374,6 +374,10 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
 			   ignored) */
 			next_hop=&i_req->dst_uri;
 		}
+		/* no path vector initially, but now is set after branch route and
+		 * callbacks execution */
+		if(i_req->path_vec.s!=0 && free_path==0)
+			free_path=1;
 	}else{
 		/* no branch route and no TMCB_REQUEST_FWDED callback => set
 		   msg uri and path to the new values (if needed) */




More information about the sr-dev mailing list