]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ARI: Ensure announcer channels are destroyed. 23/3023/4
authorMark Michelson <mmichelson@digium.com>
Mon, 13 Jun 2016 22:40:07 +0000 (17:40 -0500)
committerMark Michelson <mmichelson@digium.com>
Mon, 20 Jun 2016 14:33:45 +0000 (09:33 -0500)
commitcfebe3b94a8e80db054a899e76c19607f103a48c
tree4e0d4cd0ab9d59027c16e80f22e0bdeecc09bf5a
parente80354caab290c5a1c04ecf574c2f4709703563a
ARI: Ensure announcer channels are destroyed.

Announcer channels were not being destroyed because the
stasis_app_control structure that referenced them was not being
destroyed. The control structure was not being destroyed because it was
not being unlinked from its container. It was not being unlinked from
its container because the after bridge callback for the announcer
channel was not being run. The after bridge callback was not being run
because the after bridge datastore was not being removed from the
channel on destruction. The channel was not being destroyed because the
hangup that used to destroy the channel was now only reducing the
reference count to one. The reference count of the channel was only
being reduced to one because the stasis_app_control structure was
holding the final reference...

The control structure used to not keep a reference to the channel, so
that loop described above did not happen.

The solution is to manually remove the control structure from its
container when the playback on a bridge is complete.

ASTERISK-26083 #close
Reported by Joshua Colp

Change-Id: I0ddc0f64484ea0016245800b409b567dfe85cfb4
include/asterisk/stasis_app.h
res/ari/resource_bridges.c
res/res_stasis.c