From: Scott Griepentrog Date: Tue, 7 Apr 2015 19:34:35 +0000 (+0000) Subject: Voicemail API: fix handling of full mailbox X-Git-Tag: 11.18.0-rc1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ade8a146a3e9b9777b8e76471f134c91fe4e13b;p=thirdparty%2Fasterisk.git Voicemail API: fix handling of full mailbox Changes to an error code in svn r115582 was the accidental cause of message deletion on a full (by maxmsg) Old mailbox folder. This restores the original handling marking the message to be left in the Inbox. ASTERISK-24942 #close Review: https://reviewboard.asterisk.org/r/4595/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@434260 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 9bb0d9ecc7..d5b1dc58d1 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8802,7 +8802,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu) } else if ((!strcasecmp(vms->curbox, "INBOX") || !strcasecmp(vms->curbox, "Urgent")) && vms->heard[x] && ast_test_flag(vmu, VM_MOVEHEARD) && !vms->deleted[x]) { /* Move to old folder before deleting */ res = save_to_folder(vmu, vms, x, 1, NULL, 0); - if (res == ERROR_LOCK_PATH) { + if (res) { /* If save failed do not delete the message */ ast_log(AST_LOG_WARNING, "Save failed. Not moving message: %s.\n", res == ERROR_LOCK_PATH ? "unable to lock path" : "destination folder full"); vms->deleted[x] = 0; @@ -8812,7 +8812,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu) } else if (vms->deleted[x] && vmu->maxdeletedmsg) { /* Move to deleted folder */ res = save_to_folder(vmu, vms, x, 10, NULL, 0); - if (res == ERROR_LOCK_PATH) { + if (res) { /* If save failed do not delete the message */ vms->deleted[x] = 0; vms->heard[x] = 0;