[asterisk-commits] jpeeler: branch 1.8 r306866 - in /branches/1.8: ./ apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 8 10:21:49 CST 2011
Author: jpeeler
Date: Tue Feb 8 10:21:45 2011
New Revision: 306866
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306866
Log:
Merged revisions 306865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r306865 | jpeeler | 2011-02-08 10:21:25 -0600 (Tue, 08 Feb 2011) | 9 lines
Merged revisions 306864 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r306864 | jpeeler | 2011-02-08 10:19:17 -0600 (Tue, 08 Feb 2011) | 1 line
make this safer and fully correct, pointed out by Steve Davis
........
................
Modified:
branches/1.8/ (props changed)
branches/1.8/apps/app_voicemail.c
Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.
Modified: branches/1.8/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_voicemail.c?view=diff&rev=306866&r1=306865&r2=306866
==============================================================================
--- branches/1.8/apps/app_voicemail.c (original)
+++ branches/1.8/apps/app_voicemail.c Tue Feb 8 10:21:45 2011
@@ -3923,7 +3923,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
@@ -3935,7 +3935,7 @@
}
while ((msgdirent = readdir(msgdir))) {
- if (sscanf(msgdirent->d_name, "msg%30d.%3s", &msgdirint, extension) == 2 && msgdirint < MAXMSGLIMIT && !strcmp(extension, "txt")) {
+ if (!strcmp(extension, "txt") && msgdirint < MAXMSGLIMIT && sscanf(msgdirent->d_name, "msg%10d.%3s", &msgdirint, extension) == 2) {
map[msgdirint] = 1;
stopcount++;
ast_debug(4, "%s map[%d] = %d, count = %d\n", dir, msgdirint, map[msgdirint], stopcount);
More information about the asterisk-commits
mailing list