]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_iax2: On reload make sure to check for existing MWI subscription
authorSergej Kasumovic <sergej@bicomsystems.com>
Fri, 14 Jul 2017 06:11:50 +0000 (08:11 +0200)
committerSergej Kasumovic <sergej@bicomsystems.com>
Fri, 14 Jul 2017 06:20:51 +0000 (08:20 +0200)
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

channels/chan_iax2.c

index 67552ce4e6f78753b3bba4d3bcda7acbb05d296a..98d60ef5122d6463e286b1e801e3e52f6f9a64c9 100644 (file)
@@ -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);