From: Mark Michelson Date: Tue, 25 Sep 2012 21:13:46 +0000 (+0000) Subject: Fix error where improper IMAP greetings would be deleted. X-Git-Tag: 11.0.0-rc1~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46ecb0a53ff6a9843507e4137e52886484e0df5f;p=thirdparty%2Fasterisk.git 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) ........ Merged revisions 373735 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373737 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373738 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index dee45c853b..0386dc23b1 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1965,6 +1965,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];