From eb6ad1d9a9425d5853d8ef97a2ada0a7f6ee54ae Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 25 Sep 2012 21:11:38 +0000 Subject: [PATCH] Fix error where improper IMAP greetings would be deleted. (closes issue ASTERISK-20435) Reported by: fhackenberger Patches: asterisk-20435-imap-del-greeting.diff uploaded by Michael L. Young (License #5026) (with suggested modification made by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@373735 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 9ee4f3660d..85b9171e8b 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1808,6 +1808,11 @@ static void vm_imap_delete(char *file, int msgnum, struct ast_vm_user *vmu) return; } + if (msgnum < 0) { + imap_delete_old_greeting(file, vms); + return; + } + /* find real message number based on msgnum */ /* this may be an index into vms->msgArray based on the msgnum. */ messageNum = vms->msgArray[msgnum];