[Freeswitch-svn] [commit] r8746 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta

Freeswitch SVN mikej at freeswitch.org
Tue Jun 3 14:57:34 EDT 2008


Author: mikej
Date: Tue Jun  3 14:57:34 2008
New Revision: 8746

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c

Log:
Tue Jun  3 13:43:59 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * nta.c: accepting CANCEL with To tag copied from preliminary response



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Jun  3 14:57:34 2008
@@ -1 +1 @@
-Tue May 27 11:32:48 EDT 2008
+Tue Jun  3 14:56:27 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Tue Jun  3 14:57:34 2008
@@ -5405,14 +5405,8 @@
 
       /* From tag, Call-ID, and CSeq number has been matched above */
 
-      /* Match To tag  */
-      if (str0casecmp(irq->irq_to->a_tag, to->a_tag) &&
-	  /* Ignore failing match if tag has been set */
-	  /* and retransmitted request had no to tag */
-	  !(irq->irq_tag_set && to->a_tag == NULL))
-	;
       /* Match top Via header field */
-      else if (str0casecmp(irq->irq_via->v_branch, v->v_branch) != 0 ||
+      if (str0casecmp(irq->irq_via->v_branch, v->v_branch) != 0 ||
 	       strcasecmp(irq->irq_via->v_host, v->v_host) != 0 ||
 	       str0cmp(irq->irq_via->v_port, v->v_port) != 0)
 	;
@@ -5423,10 +5417,18 @@
 	/* Match CSeq */
 	if (irq->irq_method == cseq->cs_method &&
 	    strcmp(irq->irq_cseq->cs_method_name, 
-		   cseq->cs_method_name) == 0)
-	  return irq;		/* found */
-
-	if (return_ack && irq->irq_method == sip_method_invite)
+		   cseq->cs_method_name) == 0) {
+	  /* Match To tag  */
+	  if (!str0casecmp(irq->irq_to->a_tag, to->a_tag))
+	    return irq;		/* found */
+	}
+	else if (
+	  /* Tag set by UAS */
+	  str0casecmp(irq->irq_tag, to->a_tag) &&
+	  /* Original tag */
+	  str0casecmp(irq->irq_to->a_tag, to->a_tag))
+	  ;
+	else if (return_ack && irq->irq_method == sip_method_invite)
 	  return *return_ack = irq, NULL;
 	else if (return_cancel && irq->irq_method != sip_method_ack)
 	  return *return_cancel = irq, NULL;



More information about the Freeswitch-svn mailing list