Module: sip-router Branch: 3.1 Commit: 0880578372053b2196d7d4ef21f3ef924b5bd2c7 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=08805783...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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) (cherry picked from commit 609b0aa86624416828c0c117e0cfdbeb7643bcb8)
---
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 aea7598..b874c9b 100644 --- a/modules/tm/t_fwd.c +++ b/modules/tm/t_fwd.c @@ -377,6 +377,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) */