aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 16:35:54 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-05 16:35:54 +0000
commit9310992d2f142a225b3f6efe4f4e757ba171c5d3 (patch)
treee5368e5d724a938e26d8ad450a74f37e8e3e2593
parent5432d7272660a21acfcc615fc08ad90effc77be2 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@141267 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9277cdcb3..35cd65db3 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);