]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Since greetings are not stored in IMAP, we should
authorMark Michelson <mmichelson@digium.com>
Fri, 5 Sep 2008 16:35:54 +0000 (16:35 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 5 Sep 2008 16:35:54 +0000 (16:35 +0000)
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

apps/app_voicemail.c

index 9277cdcb3ba06228d874f512d73d20b9cd0280e3..35cd65db346c933de3f6a48fc2b498b2c7a2f47b 100644 (file)
@@ -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);