]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis: Fix crash on a hanging up channel. 15/2515/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:48:47 +0000 (16:48 -0500)
commit67390813852716db981be4e55357c1cf9d15b7df
tree7c85e34f84982d76ec6d1af9077ba97466e74e54
parenta06d6811b6e54240961896d60f7cdbfd7e767e18
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