aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-28 17:30:47 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-28 17:30:47 +0000
commit27cf4d2c6f82bf7883b3dfb4df6b8d743441f83d (patch)
tree61adf84a62a1fdff9366809466b6ed61e8f63767
parentae76caf40eb8c72c297c0ed3d1f83001bcfaf799 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@89999 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b1fd123e3..76c852a99 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);