[asterisk-commits] mmichelson: trunk r141868 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 8 17:14:41 CDT 2008


Author: mmichelson
Date: Mon Sep  8 17:14:40 2008
New Revision: 141868

URL: http://svn.digium.com/view/asterisk?view=rev&rev=141868
Log:
Um, apparently I didn't actually finish merging before committing.
Bad bad bad


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=141868&r1=141867&r2=141868
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Sep  8 17:14:40 2008
@@ -6152,10 +6152,12 @@
 	if (!ast_strlen_zero(p->callid)) { /* XXX double check, do we allow match on empty p->callid ? */
 		if (arg->method == SIP_REGISTER)
  	  	  	found = (!strcmp(p->callid, arg->callid));
-		else
- 	  	  	found = (!strcmp(p->callid, arg->callid) &&
-					 (!pedanticsipchecking || ast_strlen_zero(arg->tag) || ast_strlen_zero(p->theirtag) || !strcmp(p->theirtag, arg->tag))) ;
-
+		else {
+ 	  		found = !strcmp(p->callid, arg->callid);
+			if (pedanticsipchecking && found) {
+				found = ast_strlen_zero(arg->tag) || ast_strlen_zero(p->theirtag) || !ast_test_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED) || !strcmp(p->theirtag, arg->tag);
+			} 
+		}
 		
 		ast_debug(5, "= %s Their Call ID: %s Their Tag %s Our tag: %s\n", found ? "Found" : "No match", p->callid, p->theirtag, p->tag);
 		
@@ -6233,7 +6235,6 @@
 		}
 	}
 
-<<<<<<< .working
 restartsearch:
 	if (!pedanticsipchecking) {
 		struct sip_pvt tmp_dialog = {
@@ -6253,35 +6254,6 @@
 				ao2_unlock(dialogs);
 				usleep(1);
 				goto restartsearch;
-=======
-	ast_mutex_lock(&iflock);
-	for (p = iflist; p; p = p->next) {
-		/* In pedantic, we do not want packets with bad syntax to be connected to a PVT */
-		int found = FALSE;
-		if (ast_strlen_zero(p->callid))
-			continue;
-		if (req->method == SIP_REGISTER)
-			found = (!strcmp(p->callid, callid));
-		else {
-			found = !strcmp(p->callid, callid);
-			if (pedanticsipchecking && found) {
-				found = ast_strlen_zero(tag) || ast_strlen_zero(p->theirtag) || !ast_test_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED) || !strcmp(p->theirtag, tag);
-			}
-		}
-
-		if (option_debug > 4)
-			ast_log(LOG_DEBUG, "= %s Their Call ID: %s Their Tag %s Our tag: %s\n", found ? "Found" : "No match", p->callid, p->theirtag, p->tag);
-
-		/* If we get a new request within an existing to-tag - check the to tag as well */
-		if (pedanticsipchecking && found  && req->method != SIP_RESPONSE) {	/* SIP Request */
-			if (p->tag[0] == '\0' && totag[0]) {
-				/* We have no to tag, but they have. Wrong dialog */
-				found = FALSE;
-			} else if (totag[0]) {			/* Both have tags, compare them */
-				if (strcmp(totag, p->tag)) {
-					found = FALSE;		/* This is not our packet */
-				}
->>>>>>> .merge-right.r141809
 			}
 			ao2_unlock(dialogs);
 			return p;




More information about the asterisk-commits mailing list