]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app.c: Remove deletion of pool topic on mwi state delete
authorGeorge Joseph <gjoseph@digium.com>
Fri, 8 Mar 2019 15:40:38 +0000 (08:40 -0700)
committerSean Bright <sean.bright@gmail.com>
Thu, 14 Mar 2019 14:31:10 +0000 (10:31 -0400)
commitc87158f2da8c2acf3b85904a61abeef82d08a3c0
treed655a5d28383fde7a2ca49321a93ea15af4da23e
parentc7d58aec7a4a1c3ef4bb056f1ba07d177377f2d7
app.c:  Remove deletion of pool topic on mwi state delete

As part of an earlier voicemail refactor, ast_delete_mwi_state_full
was modified to remove the pool topic for a mailbox when the state
was deleted.  This was an attempt to prevent stale topics from
accumulating when app_voicemail was reloaded and a mailbox went
away.  Unfortunately because of the fact that when app_voicemail
reloads, ALL mailboxes are deleted then only current ones recreated,
topics were being removed from the pool that still had subscribers
on them, then recreated as new topics of the same name.  So now
modules like res_pjsip_mwi are listening on a topic that will
never receive any messages because app_voicemail is publishing on
a different topic that happens to have the same name.  The solutiuon
to this is not easy and given that accumulating topics for
deleted mailboxes is less evil that not sending NOTIFYs...

* Removed the call to stasis_topic_pool_delete_topic in
  ast_delete_mwi_state_full.

Also:

* Fixed a topic reference leak in res_pjsip_mwi
  mwi_stasis_subscription_alloc.

* Added some debugging to mwi_stasis_subscription_alloc,
  stasis_topic_create, and topic_dtor.

* Fixed a topic reference leak in an error path in
  internal_stasis_subscribe.

ASTERISK-28306
Reported-by: Jared Hull
Change-Id: Id7da0990b3ac4be4b58491536b35f41291247b27
main/app.c
main/stasis.c
res/res_pjsip_mwi.c