diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-05 23:26:11 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-05 23:26:11 +0000 |
commit | b9d0d5c00e2bd81a88a2c200a2004c2c3a4df8f4 (patch) | |
tree | f7a658097709ce86361bf290c06c3288ca729743 | |
parent | 96a98fe1607c04c36f18e381e5b971cabedf4e53 (diff) |
[IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts.
There was a fix put in a while back so that an X-Asterisk-VM-Context message header was
added to stored IMAP voicemails. This would allow for us to differentiate if the same
mailbox name was used in multiple contexts. The problem still left was that not all places
where messages were retrieved actually attempted to use this header for information when
retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain
work as expected.
(closes issue #13853)
Reported by: vicks1
Patches:
13853_v2.patch uploaded by mmichelson (license 60)
Tested by: lmadsen
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@180464 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_voicemail.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 1a4b4b055..992de3b5b 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1229,6 +1229,7 @@ static int messagecount(const char *context, const char *mailbox, const char *fo ast_mutex_lock(&vms_p->lock); pgm = mail_newsearchpgm (); hdr = mail_newsearchheader ("X-Asterisk-VM-Extension", (char *)(!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : mailbox)); + hdr->next = mail_newsearchheader("X-Asterisk-VM-Context", S_OR(context, "default")); pgm->header = hdr; if (fold != 1) { pgm->unseen = 1; @@ -1573,6 +1574,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box) /* Check IMAP folder for Asterisk messages only... */ hdr = mail_newsearchheader ("X-Asterisk-VM-Extension", (!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : vmu->mailbox)); + hdr->next = mail_newsearchheader("X-Asterisk-VM-Context", vmu->context); pgm->header = hdr; pgm->deleted = 0; pgm->undeleted = 1; |