[asterisk-commits] mmichelson: branch 1.6.1 r141870 - in /branches/1.6.1: ./ channels/chan_sip.c

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


Author: mmichelson
Date: Mon Sep  8 17:15:28 2008
New Revision: 141870

URL: http://svn.digium.com/view/asterisk?view=rev&rev=141870
Log:
Merged revisions 141868 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r141868 | mmichelson | 2008-09-08 17:14:40 -0500 (Mon, 08 Sep 2008) | 4 lines

Um, apparently I didn't actually finish merging before committing.
Bad bad bad


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=141870&r1=141869&r2=141870
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Mon Sep  8 17:15:28 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