mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-01 18:09:41 +00:00
Merge "stasis: Call callbacks when imparting fails" into 16
This commit is contained in:
@@ -594,6 +594,9 @@ enum ast_bridge_impart_flags {
|
|||||||
* it were placed into the bridge by ast_bridge_join().
|
* it were placed into the bridge by ast_bridge_join().
|
||||||
* Channels placed into a bridge by ast_bridge_join() are
|
* Channels placed into a bridge by ast_bridge_join() are
|
||||||
* removed by a third party using ast_bridge_remove().
|
* removed by a third party using ast_bridge_remove().
|
||||||
|
*
|
||||||
|
* \note Any callbacks on the channel will be invoked on failure
|
||||||
|
* with the reason as AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED.
|
||||||
*/
|
*/
|
||||||
int ast_bridge_impart(struct ast_bridge *bridge,
|
int ast_bridge_impart(struct ast_bridge *bridge,
|
||||||
struct ast_channel *chan,
|
struct ast_channel *chan,
|
||||||
|
@@ -1953,6 +1953,7 @@ int ast_bridge_impart(struct ast_bridge *bridge,
|
|||||||
res = bridge_impart_internal(bridge, chan, swap, features, flags, &cond);
|
res = bridge_impart_internal(bridge, chan, swap, features, flags, &cond);
|
||||||
if (res) {
|
if (res) {
|
||||||
/* Impart failed. Signal any other waiting impart threads */
|
/* Impart failed. Signal any other waiting impart threads */
|
||||||
|
ast_bridge_discard_after_callback(chan, AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED);
|
||||||
bridge_channel_impart_signal(chan);
|
bridge_channel_impart_signal(chan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user