]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_confbridge: Bridge and announcers not removed if conference ends quickly
authorRobert Mordec <r.mordec@slican.pl>
Mon, 21 May 2018 12:24:51 +0000 (14:24 +0200)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 29 Jun 2018 16:07:06 +0000 (10:07 -0600)
commit9d3f3a4b0acc016c68be678681de8df45d571482
tree05517b5f7e183f1ef6c5ed01621729dd5c9ac4e2
parent5f517bacd0296fe8cf4c5e16a85a8fd999a7a4d9
app_confbridge: Bridge and announcers not removed if conference ends quickly

If a conference is ended very quickly after it was created (i.e., the
first user immediately hangs up) then the conference bridge and announcer
channels are not removed.

When a conference is created, the push_announcer() function is added to
the playback queue task processor and the conference object reference is
bumped.  If a conference is ended while the push_announcer() function is
still going then the ao2_cleanup(conference) at the end of
push_announcer() will call the destructor function -
destroy_conference_bridge().

The destroy_conference_bridge() function will then add the
hangup_playback() task to the playback queue and will wait for it to end.
Since it is already a current task of the playback queue it will wait
forever.

This patch makes the conference thread call push_announcer() directly.
This way the conference object reference bump is not needed.  Since the
playback queue task processor is only used by the conference thread
itself, there is no danger of trying to play announcements before the
announcer is pushed to the bridge.

ASTERISK-27870 #close

Change-Id: I947a50fb121422d90fd1816d643a54d75185a477
apps/app_confbridge.c