]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix error where improper IMAP greetings would be deleted.
authorMark Michelson <mmichelson@digium.com>
Tue, 25 Sep 2012 21:12:40 +0000 (21:12 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 25 Sep 2012 21:12:40 +0000 (21:12 +0000)
(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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@373737 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 0c6ed7fe1e6b9a49a31d3d38184026a725b0af68..5ec3583643858cfd151c3c4a4e12aa9fd966512f 100644 (file)
@@ -1809,6 +1809,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];