[svn-commits] kpfleming: branch 1.4 r124743 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 23 16:22:08 CDT 2008


Author: kpfleming
Date: Mon Jun 23 16:22:08 2008
New Revision: 124743

URL: http://svn.digium.com/view/asterisk?view=rev&rev=124743
Log:
emit a warning if the old IAX2 call searching code finds a call when the new code did not... so that we can get rid of the old code in 2-3 months


Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=124743&r1=124742&r2=124743
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Mon Jun 23 16:22:08 2008
@@ -1556,7 +1556,17 @@
  			}
  		}
 
-		/* Look for an existing connection first */
+		/* If we get here, we SHOULD NOT find a call structure for this
+		   callno; if we do, it means that there is a call structure that
+		   has a peer callno but did NOT get entered into the hash table,
+		   which is bad.
+
+		   If we find a call structure using this old, slow method, output a log
+		   message so we'll know about it. After a few months of leaving this in
+		   place, if we don't hear about people seeing these messages, we can
+		   remove this code for good.
+		*/
+
 		for (x = 1; !res && x < maxnontrunkcall; x++) {
 			ast_mutex_lock(&iaxsl[x]);
 			if (iaxs[x]) {
@@ -1568,6 +1578,7 @@
 			if (!res || !return_locked)
 				ast_mutex_unlock(&iaxsl[x]);
 		}
+
 		for (x = TRUNK_CALL_START; !res && x < maxtrunkcall; x++) {
 			ast_mutex_lock(&iaxsl[x]);
 			if (iaxs[x]) {
@@ -1578,6 +1589,10 @@
 			}
 			if (!res || !return_locked)
 				ast_mutex_unlock(&iaxsl[x]);
+		}
+
+		if (res) {
+			ast_log(LOG_WARNING, "Old call search code found call number %d that was not in hash table!\n", res);
 		}
 	}
 	if (!res && (new >= NEW_ALLOW)) {




More information about the svn-commits mailing list