[sr-dev] git:master: topoh: let replies for CANCEL requests be handled

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 21 18:28:18 CET 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Feb 21 18:26:34 2014 +0100

topoh: let replies for CANCEL requests be handled

- CANCEL is hop by hop, but can have the call-id hidden when sending out

---

 modules/topoh/topoh_mod.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/modules/topoh/topoh_mod.c b/modules/topoh/topoh_mod.c
index 698f853..b533945 100644
--- a/modules/topoh/topoh_mod.c
+++ b/modules/topoh/topoh_mod.c
@@ -318,8 +318,9 @@ int th_msg_received(void *data)
 		if(msg.via2==0)
 		{
 			/* one Via in received reply -- it is for local generated request
-			 * - nothing to unhide */
-			goto done;
+			 * - nothing to unhide unless is CANCEL/ACK */
+			if((get_cseq(&msg)->method_id)&(METHOD_CANCEL))
+				goto done;
 		}
 
 		th_unmask_via(&msg, &th_cookie_value);
@@ -385,12 +386,6 @@ int th_msg_sent(void *data)
 		th_del_cookie(&msg);
 	if(msg.first_line.type==SIP_REQUEST)
 	{
-		if(msg.via2==0)
-		{
-			/* one Via in request sent out -- it is local generated
-			 * - nothing to hide */
-			goto done;
-		}
 		direction = (th_cookie_value.s[0]=='u')?1:0; /* upstream/downstram */
 		dialog = (get_to(&msg)->tag_value.len>0)?1:0;
 		local = (th_cookie_value.s[0]!='d'&&th_cookie_value.s[0]!='u')?1:0;




More information about the sr-dev mailing list