[asterisk-commits] russell: trunk r114674 - in /trunk: ./ channels/chan_iax2.c

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


Author: russell
Date: Fri Apr 25 17:00:35 2008
New Revision: 114674

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114674
Log:
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:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=114674&r1=114673&r2=114674
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Apr 25 17:00:35 2008
@@ -1499,7 +1499,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 */
@@ -1507,10 +1507,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 */
@@ -1518,11 +1518,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