[asterisk-commits] tilghman: trunk r63361 - in /trunk: ./
apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 7 23:26:03 MST 2007
Author: tilghman
Date: Tue May 8 01:26:02 2007
New Revision: 63361
URL: http://svn.digium.com/view/asterisk?view=rev&rev=63361
Log:
Merged revisions 63360 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r63360 | tilghman | 2007-05-08 01:22:37 -0500 (Tue, 08 May 2007) | 10 lines
Merged revisions 63359 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r63359 | tilghman | 2007-05-08 01:20:16 -0500 (Tue, 08 May 2007) | 2 lines
Issue 9527 - upon entering a folder, no message is selected (curmsg == -1), so deleting causes memory corruption (beyond bounds)
........
................
Modified:
trunk/ (props changed)
trunk/apps/app_voicemail.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=63361&r1=63360&r2=63361
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue May 8 01:26:02 2007
@@ -6783,21 +6783,24 @@
}
break;
case '7':
- vms.deleted[vms.curmsg] = !vms.deleted[vms.curmsg];
- if (useadsi)
- adsi_delete(chan, &vms);
- if (vms.deleted[vms.curmsg])
- cmd = ast_play_and_wait(chan, "vm-deleted");
- else
- cmd = ast_play_and_wait(chan, "vm-undeleted");
- if (ast_test_flag((&globalflags), VM_SKIPAFTERCMD)) {
- if (vms.curmsg < vms.lastmsg) {
- vms.curmsg++;
- cmd = play_message(chan, vmu, &vms);
- } else {
- cmd = ast_play_and_wait(chan, "vm-nomore");
+ if (vms.curmsg >= 0 && vms.curmsg <= vms.lastmsg) {
+ vms.deleted[vms.curmsg] = !vms.deleted[vms.curmsg];
+ if (useadsi)
+ adsi_delete(chan, &vms);
+ if (vms.deleted[vms.curmsg])
+ cmd = ast_play_and_wait(chan, "vm-deleted");
+ else
+ cmd = ast_play_and_wait(chan, "vm-undeleted");
+ if (ast_test_flag((&globalflags), VM_SKIPAFTERCMD)) {
+ if (vms.curmsg < vms.lastmsg) {
+ vms.curmsg++;
+ cmd = play_message(chan, vmu, &vms);
+ } else {
+ cmd = ast_play_and_wait(chan, "vm-nomore");
+ }
}
- }
+ } else /* Delete not valid if we haven't selected a message */
+ cmd = 0;
#ifdef IMAP_STORAGE
deleted = 1;
#endif
More information about the asterisk-commits
mailing list