[asterisk-commits] tilghman: branch 1.6.0 r131168 - in /branches/1.6.0: ./ main/logger.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 15 19:54:50 CDT 2008


Author: tilghman
Date: Tue Jul 15 19:54:50 2008
New Revision: 131168

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

........
r131166 | tilghman | 2008-07-15 19:52:48 -0500 (Tue, 15 Jul 2008) | 3 lines

Fix rotate strategy
(Closes issue #13086)

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/logger.c

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

Modified: branches/1.6.0/main/logger.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/logger.c?view=diff&rev=131168&r1=131167&r2=131168
==============================================================================
--- branches/1.6.0/main/logger.c (original)
+++ branches/1.6.0/main/logger.c Tue Jul 15 19:54:50 2008
@@ -484,19 +484,19 @@
 			for (which = 0; which < ARRAY_LEN(suffixes); which++) {
 				snprintf(new, sizeof(new), "%s.%d%s", filename, x, suffixes[which]);
 				fd = open(new, O_RDONLY);
-				if (fd > -1)
+				if (fd > -1) {
 					close(fd);
-				else {
 					found = 1;
 					break;
 				}
 			}
-			if (!found)
+			if (!found) {
 				break;
+			}
 		}
 
 		/* Found an empty slot */
-		for (y = x; y > -1; y--) {
+		for (y = x; y > 0; y--) {
 			for (which = 0; which < ARRAY_LEN(suffixes); which++) {
 				snprintf(old, sizeof(old), "%s.%d%s", filename, y - 1, suffixes[which]);
 				fd = open(old, O_RDONLY);




More information about the asterisk-commits mailing list