bridge_softmix.c: Fix crash if channel fails to join mixing tech.

softmix_bridge_join() failed because of an allocation failure.  To address
this, the softmix bridge technology now checks if the channel failed to
join softmix successfully.  In addition, the bridge now begins the process
of kicking the channel out of the bridge so we don't have channels
partially in the bridge for very long.

* Fix the test_channel_feature_hooks.c unit tests.  The test channel must
have a valid codec to join the simple_bridge technology.  This patch makes
joining a bridge more strict by not allowing partially joined channels to
remain in the bridge.

Change-Id: I97e2ade6a2bcd1214f24fb839fda948825b61a2b
This commit is contained in:
Richard Mudgett
2016-04-13 13:20:23 -05:00
parent 6112a94d03
commit 5e388d4188
4 changed files with 32 additions and 3 deletions

View File

@@ -107,6 +107,9 @@ struct ast_bridge_technology {
* \retval -1 on failure
*
* \note On entry, bridge is already locked.
*
* \note The bridge technology must tollerate a failed to join channel
* until it can be kicked from the bridge.
*/
int (*join)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
/*!