mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2727,7 +2727,6 @@ int ast_publish_mwi_state_full(
|
||||
{
|
||||
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 @@ int ast_publish_mwi_state_full(
|
||||
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user