]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis: Fix crash on a hanging up channel. 08/2508/1
authorRichard Mudgett <rmudgett@digium.com>
Mon, 28 Mar 2016 23:10:40 +0000 (18:10 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 30 Mar 2016 21:23:40 +0000 (16:23 -0500)
commita179aba65e117afb6480d8396e92df2e5d2d4628
treefc0ce2a14a1a13aa5245bd616d16572697028a1a
parente1fdb0a6da0287452837c25b1295baa30b5866ed
res_stasis: Fix crash on a hanging up channel.

* Give the struct stasis_app_control ao2 object a ref to the channel held
in the object.  Now the channel will still be around if a thread needs to
post a stasis message instead of crash because the topic was destroyed.

* Moved stopping any lingering silence generator out of the struct
stasis_app_control destructor and made it a part of exiting the Stasis
application.  Who knows which thread the destructor will be called under
so it cannot affect the channel's silence generator.  Not only was the
channel unprotected when the silence generator was stopped, stasis may no
longer even control the channel.

ASTERISK-25882

Change-Id: I21728161b5fe638cef7976fa36a605043a7497e4
res/res_stasis.c
res/stasis/control.c
res/stasis/control.h