From e2f5f81c8302d1dfb8ec2b8c1384ed53e2a57435 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Mon, 24 Aug 2009 17:07:29 +0000 Subject: [PATCH] Merged revisions 213833 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r213833 | jpeeler | 2009-08-24 11:43:57 -0500 (Mon, 24 Aug 2009) | 14 lines Fix storage of greetings when using IMAP_STORAGE Fix checking if the imapgreetings option is turned on to store the greeting in IMAP. (closes issue #14950) Reported by: noahisaac Patches: 14950.patch uploaded by mmichelson (license 60) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@213837 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 0ed2a73496..2df46ff392 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1397,6 +1397,11 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i void *buf; int tempcopy = 0; STRING str; + + /* Back out early if this is a greeting and we don't want to store greetings in IMAP */ + if (msgnum < 0 && !imapgreetings) { + return 0; + } /* Attach only the first format */ fmt = ast_strdupa(fmt);