From f1d612adb9a134558f2ed613dcfa510453dff13b Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Wed, 28 Nov 2007 17:30:47 +0000 Subject: [PATCH] Recording greetings when using IMAP storage was causing zero-length files to be stored. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b1fd123e35..76c852a99d 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -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);