From: Mark Michelson Date: Wed, 7 Nov 2007 23:18:22 +0000 (+0000) Subject: If imapfolder has been specified in voicemail.conf, we should not connect to INBOX... X-Git-Tag: 1.6.0-beta1~3^2~947 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f34bc609b2e6999f038029a19f3c8ba65b9e171;p=thirdparty%2Fasterisk.git If imapfolder has been specified in voicemail.conf, we should not connect to INBOX... ever. It may not exist. (closes issue #11151, reported by selsky, patched by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89092 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 4359ee7e65..0d98b18dee 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4910,8 +4910,8 @@ static int init_mailstream(struct vm_state *vms, int box) #else #include "linkage.c" #endif - /* Connect to INBOX first to get folders delimiter */ - imap_mailbox_name(tmp, sizeof(tmp), vms, 0, 0); + /* Connect to mailbox to get mailstream so we can get delimiter */ + imap_mailbox_name(tmp, sizeof(tmp), vms, 0, 1); stream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL); if (stream == NIL) { ast_log (LOG_ERROR, "Can't connect to imap server %s\n", tmp);