From: Sergej Kasumovic Date: Fri, 14 Jul 2017 06:11:50 +0000 (+0200) Subject: chan_iax2: On reload make sure to check for existing MWI subscription X-Git-Tag: 13.18.0-rc1~132^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd6ca488a7d2d446a7fb2eca995926601d17de7;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 67552ce4e6..98d60ef512 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -13084,7 +13084,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st 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);