[Asterisk-code-review] chan iax2: On reload make sure to check for existing MWI sub... (asterisk[13])

Sergej Kasumovic asteriskteam at digium.com
Fri Jul 14 01:20:52 CDT 2017


Sergej Kasumovic has uploaded this change for review. ( https://gerrit.asterisk.org/6017


Change subject: chan_iax2: On reload make sure to check for existing MWI subscription
......................................................................

chan_iax2: On reload make sure to check for existing MWI subscription

On every reload of chan_iax2 module, MWI subscription was added, which
results in additional taskprocessors being accumulated over time.

This commit fixes it by making sure we check for existing subscription
first.

This was verified with 'core show taskprocessors' CLI command.

ASTERISK-27122 #close

Change-Id: Ie2ef528fd5ca01b933eeb88188cc10967899cfb9
---
M channels/chan_iax2.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/17/6017/1

diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 67552ce..98d60ef 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -13084,7 +13084,7 @@
 		ast_free_acl_list(oldacl);
 	}
 
-	if (!ast_strlen_zero(peer->mailbox)) {
+	if (!ast_strlen_zero(peer->mailbox) && !peer->mwi_event_sub) {
 		struct stasis_topic *mailbox_specific_topic;
 
 		mailbox_specific_topic = ast_mwi_topic(peer->mailbox);

-- 
To view, visit https://gerrit.asterisk.org/6017
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2ef528fd5ca01b933eeb88188cc10967899cfb9
Gerrit-Change-Number: 6017
Gerrit-PatchSet: 1
Gerrit-Owner: Sergej Kasumovic <sergej at bicomsystems.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170714/06944f81/attachment-0001.html>


More information about the asterisk-code-review mailing list