From: Mark Michelson Date: Fri, 5 Sep 2008 16:35:54 +0000 (+0000) Subject: Since greetings are not stored in IMAP, we should X-Git-Tag: 1.4.22-rc4~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ac105b26db16de7882aceabb3b52645e2a75455;p=thirdparty%2Fasterisk.git Since greetings are not stored in IMAP, we should not be DISPOSE'ing of them the same way we do with other messages. (closes issue #13414) Reported by: mthomasslo Patches: 13414v2.patch uploaded by putnopvut (license 60) Tested by: mthomasslo git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141267 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 9277cdcb3b..35cd65db34 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2704,8 +2704,16 @@ static int remove_file(char *dir, int msgnum) if (msgnum > -1) { snprintf(msgnums, sizeof(msgnums), "%d", msgnum); make_file(fn, sizeof(fn), dir, msgnum); - } else + } else { +#ifndef IMAP_STORAGE ast_copy_string(fn, dir, sizeof(fn)); +#else + /*IMAP stores greetings locally so it should not + * try to dispose of them + */ + return 0; +#endif + } ast_filedelete(fn, NULL); snprintf(full_fn, sizeof(full_fn), "%s.txt", fn); unlink(full_fn);