[svn-commits] russell: branch 1.6.0 r108928 - in /branches/1.6.0: ./ apps/app_voicemail.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Mar 16 12:54:13 CDT 2008
Author: russell
Date: Sun Mar 16 12:54:13 2008
New Revision: 108928
URL: http://svn.digium.com/view/asterisk?view=rev&rev=108928
Log:
Merged revisions 108927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r108927 | russell | 2008-03-16 12:53:46 -0500 (Sun, 16 Mar 2008) | 7 lines
Fix polling for mailbox changes in mailboxes that are not in the default vm context.
(closes issue #12223)
Reported by: DEA
Patches:
vm-polled-imap.txt uploaded by DEA (license 3)
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/apps/app_voicemail.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_voicemail.c?view=diff&rev=108928&r1=108927&r2=108928
==============================================================================
--- branches/1.6.0/apps/app_voicemail.c (original)
+++ branches/1.6.0/apps/app_voicemail.c Sun Mar 16 12:54:13 2008
@@ -7999,6 +7999,7 @@
static void mwi_sub_event_cb(const struct ast_event *event, void *userdata)
{
const char *mailbox;
+ const char *context;
uint32_t uniqueid;
unsigned int len;
struct mwi_sub *mwi_sub;
@@ -8010,18 +8011,27 @@
return;
mailbox = ast_event_get_ie_str(event, AST_EVENT_IE_MAILBOX);
+ context = ast_event_get_ie_str(event, AST_EVENT_IE_CONTEXT);
uniqueid = ast_event_get_ie_uint(event, AST_EVENT_IE_UNIQUEID);
len = sizeof(*mwi_sub);
if (!ast_strlen_zero(mailbox))
len += strlen(mailbox);
+ if (!ast_strlen_zero(context))
+ len += strlen(context) + 1; /* Allow for seperator */
+
if (!(mwi_sub = ast_calloc(1, len)))
return;
mwi_sub->uniqueid = uniqueid;
if (!ast_strlen_zero(mailbox))
strcpy(mwi_sub->mailbox, mailbox);
+
+ if (!ast_strlen_zero(context)) {
+ strcat(mwi_sub->mailbox, "@");
+ strcat(mwi_sub->mailbox, context);
+ }
AST_RWLIST_WRLOCK(&mwi_subs);
AST_RWLIST_INSERT_TAIL(&mwi_subs, mwi_sub, entry);
More information about the svn-commits
mailing list