[asterisk-commits] alecdavis: branch 1.4 r312290 - /branches/1.4/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 1 06:02:31 CDT 2011


Author: alecdavis
Date: Fri Apr  1 06:02:26 2011
New Revision: 312290

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=312290
Log:
app_voicemail: leave_vociemail doesn't use last_message_index to store next message

trivial change to bring inline with 1.6.2 1.8 and trunk.
The symptom was if msg0000 was missing, and the last was msg0004,
the next msgnum would be msg0000 when it should have been msg0005  

(issue #18998)
Reported by: tootai
Patches: 
      bug18998.diff2.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


Modified:
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=312290&r1=312289&r2=312290
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Fri Apr  1 06:02:26 2011
@@ -4534,12 +4534,10 @@
 					ast_unlock_path(dir);
 					inprocess_count(vmu->mailbox, vmu->context, -1);
 				} else {
-					for (;;) {
-						make_file(fn, sizeof(fn), dir, msgnum);
-						if (!EXISTS(dir, msgnum, fn, NULL))
-							break;
-						msgnum++;
-					}
+#ifndef IMAP_STORAGE
+					msgnum = last_message_index(vmu, dir) + 1;
+#endif
+					make_file(fn, sizeof(fn), dir, msgnum);
 
 					/* assign a variable with the name of the voicemail file */ 
 #ifndef IMAP_STORAGE




More information about the asterisk-commits mailing list