[asterisk-commits] russell: branch 1.6.0 r114675 - in /branches/1.6.0: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 25 17:03:25 CDT 2008


Author: russell
Date: Fri Apr 25 17:03:25 2008
New Revision: 114675

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

................
r114674 | russell | 2008-04-25 17:00:35 -0500 (Fri, 25 Apr 2008) | 11 lines

Merged revisions 114673 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114673 | russell | 2008-04-25 16:54:40 -0500 (Fri, 25 Apr 2008) | 3 lines

Use consistent logic for checking to see if a call number has been chosen yet.
Also, remove some redundant logic I recently added in a fix.

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_iax2.c

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

Modified: branches/1.6.0/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_iax2.c?view=diff&rev=114675&r1=114674&r2=114675
==============================================================================
--- branches/1.6.0/channels/chan_iax2.c (original)
+++ branches/1.6.0/channels/chan_iax2.c Fri Apr 25 17:03:25 2008
@@ -1492,7 +1492,7 @@
 	char host[80];
 
 	if (new <= NEW_ALLOW) {
-		for (x=1;(res < 1) && (x<maxnontrunkcall);x++) {
+		for (x = 1; !res && x < maxnontrunkcall; x++) {
 			ast_mutex_lock(&iaxsl[x]);
 			if (iaxs[x]) {
 				/* Look for an exact match */
@@ -1500,10 +1500,10 @@
 					res = x;
 				}
 			}
-			if (!res || (res && !return_locked))
+			if (!res || !return_locked)
 				ast_mutex_unlock(&iaxsl[x]);
 		}
-		for (x=TRUNK_CALL_START;(res < 1) && (x<maxtrunkcall);x++) {
+		for (x = TRUNK_CALL_START; !res && x < maxtrunkcall; x++) {
 			ast_mutex_lock(&iaxsl[x]);
 			if (iaxs[x]) {
 				/* Look for an exact match */
@@ -1511,11 +1511,11 @@
 					res = x;
 				}
 			}
-			if (!res || (res && !return_locked))
+			if (!res || !return_locked)
 				ast_mutex_unlock(&iaxsl[x]);
 		}
 	}
-	if ((res < 1) && (new >= NEW_ALLOW)) {
+	if (!res && (new >= NEW_ALLOW)) {
 		int start, found = 0;
 
 		/* It may seem odd that we look through the peer list for a name for




More information about the asterisk-commits mailing list