[asterisk-commits] may: branch may/ooh323_ipv6 r307062 - /team/may/ooh323_ipv6/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 8 15:01:39 CST 2011


Author: may
Date: Tue Feb  8 15:01:35 2011
New Revision: 307062

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307062
Log:
up to trunk

Modified:
    team/may/ooh323_ipv6/apps/app_voicemail.c

Modified: team/may/ooh323_ipv6/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/apps/app_voicemail.c?view=diff&rev=307062&r1=307061&r2=307062
==============================================================================
--- team/may/ooh323_ipv6/apps/app_voicemail.c (original)
+++ team/may/ooh323_ipv6/apps/app_voicemail.c Tue Feb  8 15:01:35 2011
@@ -3916,7 +3916,7 @@
 	DIR *msgdir;
 	struct dirent *msgdirent;
 	int msgdirint;
-	char extension[3];
+	char extension[4];
 	int stopcount = 0;
 
 	/* Reading the entire directory into a file map scales better than
@@ -3928,7 +3928,7 @@
 	}
 
 	while ((msgdirent = readdir(msgdir))) {
-		if (sscanf(msgdirent->d_name, "msg%30d.%3s", &msgdirint, extension) == 2 && msgdirint < MAXMSGLIMIT && !strcmp(extension, "txt")) {
+		if (sscanf(msgdirent->d_name, "msg%30d.%3s", &msgdirint, extension) == 2 && !strcmp(extension, "txt") && msgdirint < MAXMSGLIMIT) {
 			map[msgdirint] = 1;
 			stopcount++;
 			ast_debug(4, "%s map[%d] = %d, count = %d\n", dir, msgdirint, map[msgdirint], stopcount);
@@ -6767,14 +6767,16 @@
 			}
 			
 			/* Back up the original file, so we can retry the prepend and restore it after forward. */
+#ifndef IMAP_STORAGE
 			if (already_recorded) {
 				ast_filecopy(backup, msgfile, NULL);
 				copy(backup_textfile, textfile);
 			}
 			else {
 				ast_filecopy(msgfile, backup, NULL);
-				copy(textfile,backup_textfile);
-			}
+				copy(textfile, backup_textfile);
+			}
+#endif
 			already_recorded = 1;
 
 			if (record_gain)




More information about the asterisk-commits mailing list