diff options
author | Mark Michelson <mmichelson@digium.com> | 2007-12-14 21:40:34 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2007-12-14 21:40:34 +0000 |
commit | f848ebc895f5e7c6fe3abcfe479f8c1e2d820f0f (patch) | |
tree | 9fbc6f1a137c5b58742ff2eb5521f8f6f0caa18d /apps | |
parent | 7029e8fdd11d7f128fae0b9fd0b501624293fad8 (diff) |
Change places where the name "INBOX" was hardcoded to use the imapfolder
setting from voicemail.conf instead. This commit will help to get issue
#11415 moving towards commitment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 82ca5a303..0d2cc8eab 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2273,7 +2273,11 @@ static void free_zone(struct vm_zone *z) static const char *mbox(int id) { static const char *msgs[] = { +#ifdef IMAP_STORAGE + imapfolder, +#else "INBOX", +#endif "Old", "Work", "Family", @@ -2292,7 +2296,11 @@ static int folder_int(const char *folder) /*assume a NULL folder means INBOX*/ if (!folder) return 0; - if(!strcasecmp(folder, "INBOX")) +#ifdef IMAP_STORAGE + if (!strcasecmp(folder, imapfolder)) +#else + if (!strcasecmp(folder, "INBOX")) +#endif return 0; else if (!strcasecmp(folder, "Old")) return 1; @@ -2706,7 +2714,7 @@ static int inboxcount(const char *mailbox_context, int *newmsgs, int *oldmsgs) mailboxnc = (char *)mailbox_context; } if (newmsgs) { - if((*newmsgs = messagecount(context, mailboxnc, "INBOX")) < 0) + if((*newmsgs = messagecount(context, mailboxnc, imapfolder)) < 0) return -1; } if (oldmsgs) { |