]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Recording greetings when using IMAP storage was causing zero-length files to be stored.
authorMark Michelson <mmichelson@digium.com>
Wed, 28 Nov 2007 17:30:47 +0000 (17:30 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 28 Nov 2007 17:30:47 +0000 (17:30 +0000)
Since greetings are not retrieved from IMAP anyway, it is pointless to attempt storing them there.

(closes issue #11359, reported by spditner, patched by me)

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

apps/app_voicemail.c

index b1fd123e355518f60f34cfd4429d5b6f9b2569e5..76c852a99d3941c6965db15803900fac1f616ee2 100644 (file)
@@ -2310,6 +2310,10 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i
        void *buf;
        int tempcopy = 0;
        STRING str;
+
+       /*Greetings are not retrieved from IMAP, so there is no reason to attempt storing them there either*/
+       if(msgnum < 0)
+               return 0;
        
        /* Attach only the first format */
        fmt = ast_strdupa(fmt);