mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
ARI: Fix a crash caused by hanging during playback to a channel in a bridge
ASTERISK-24147 #close Reported by: Edvin Vidmar Review: https://reviewboard.asterisk.org/r/3908/ ........ Merged revisions 421879 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421880 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1190,6 +1190,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
RAII_VAR(struct stasis_app_control *, control, NULL, control_unlink);
|
||||
struct ast_bridge *bridge = NULL;
|
||||
int res = 0;
|
||||
int needs_depart;
|
||||
|
||||
ast_assert(chan != NULL);
|
||||
|
||||
@@ -1305,6 +1306,13 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
}
|
||||
}
|
||||
|
||||
ast_channel_lock(chan);
|
||||
needs_depart = ast_channel_is_bridged(chan);
|
||||
ast_channel_unlock(chan);
|
||||
if (needs_depart) {
|
||||
ast_bridge_depart(chan);
|
||||
}
|
||||
|
||||
app_unsubscribe_bridge(app, stasis_app_get_bridge(control));
|
||||
ao2_cleanup(bridge);
|
||||
|
||||
|
Reference in New Issue
Block a user