summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-09-01 04:17:02 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-09-06 12:58:25 -0500
commit983f3e1f0fb7c7089cf13c33b3d3fe515d8d458e (patch)
tree3aca4b26e7a3b800b1c9c1f2916244f125cee82c /include/asterisk
parent47e4cbc3952b08c24e6a22c943442b2382c13861 (diff)
stasis/control: Fix possible deadlock with swap channel
If an error occurs during a bridge impart it's possible that the "bridge_after" callback might try to run before control_swap_channel_in_bridge has been signalled to continue. Since control_swap_channel_in_bridge is holding the control lock and the callback needs it, a deadlock will occur. * control_swap_channel_in_bridge now only holds the control lock while it's actually modifying the control structure and releases it while the bridge impart is running. * bridge_after_cb is now tolerant of impart failures. Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/bridge_after.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/bridge_after.h b/include/asterisk/bridge_after.h
index 53f30b9ad..045168571 100644
--- a/include/asterisk/bridge_after.h
+++ b/include/asterisk/bridge_after.h
@@ -45,6 +45,8 @@ enum ast_bridge_after_cb_reason {
AST_BRIDGE_AFTER_CB_REASON_DEPART,
/*! Was explicitly removed by external code. */
AST_BRIDGE_AFTER_CB_REASON_REMOVED,
+ /*! The channel failed to enter the bridge. */
+ AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED,
};
/*!