]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis: Fix crash on a hanging up channel.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 28 Mar 2016 23:10:40 +0000 (18:10 -0500)
committerJoshua Colp <jcolp@digium.com>
Tue, 5 Apr 2016 14:18:10 +0000 (11:18 -0300)
commit7b6c4decd31377f5d250a41e52d300bd5d1b092d
treec007e38201f64a910f8eacb0171c6c36ba97d5d6
parentfad0410486b3a47743331f14fcb565b79357887c
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