[asterisk-commits] mmichelson: trunk r391921 - /trunk/main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 14 18:26:52 CDT 2013
Author: mmichelson
Date: Fri Jun 14 18:26:50 2013
New Revision: 391921
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391921
Log:
Fix regression in MWI stasis handling.
In revision 389733, mwi state allocation was placed into its
own function instead of performing the allocation in-line when
required. The issue was that in ast_publish_mwi_state_full(),
the local variable "uniqueid" was no longer being set, but it was
still being used as the topic for MWI. This meant that all MWI
publications ended up being published to the "" (empty string)
mailbox topic. Thus MWI subscriptions for specific mailboxes were
never notified of mailbox state changes.
This change fixes the issue by removing the local uniqueid variable
from ast_publish_mwi_state_full() and instead referencing the
mwi_state->uniqueid field since it has been properly set.
(closes issue ASTERISK-21913)
Reported by Malcolm Davenport
Modified:
trunk/main/app.c
Modified: trunk/main/app.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/app.c?view=diff&rev=391921&r1=391920&r2=391921
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Fri Jun 14 18:26:50 2013
@@ -2727,7 +2727,6 @@
{
RAII_VAR(struct ast_mwi_state *, mwi_state, NULL, ao2_cleanup);
RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
- struct ast_str *uniqueid = ast_str_alloca(AST_MAX_MAILBOX_UNIQUEID);
struct stasis_topic *mailbox_specific_topic;
mwi_state = ast_mwi_create(mailbox, context);
@@ -2758,7 +2757,7 @@
message = stasis_message_create(ast_mwi_state_type(), mwi_state);
- mailbox_specific_topic = ast_mwi_topic(ast_str_buffer(uniqueid));
+ mailbox_specific_topic = ast_mwi_topic(mwi_state->uniqueid);
if (!mailbox_specific_topic) {
return -1;
}
More information about the asterisk-commits
mailing list