From: Richard Mudgett Date: Fri, 15 Apr 2016 16:41:49 +0000 (-0500) Subject: bridge_channel.c: Ignore role setup failure in channel push. X-Git-Tag: 14.0.0-beta1~253^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6365f0018f520957622bc927bb4c2ca3441135c7;p=thirdparty%2Fasterisk.git bridge_channel.c: Ignore role setup failure in channel push. We have to setup the channel roles after the bridge class push is called because the bridge class push callback may have set roles on the incoming channel. Since we have already partially pushed the channel into the bridge and reversing what we have already done could be problematic, the only thing we can do is press on to complete pushing the channel into the bridge. * Ignore any channel role setup errors after pushing the channel into a bridge. The channel may behave incorrectly in the bridge but we can no longer abort the push at this time. Change-Id: I08a97082b729052ee65cdca6bb730cf1289ede00 --- diff --git a/main/bridge_channel.c b/main/bridge_channel.c index 8172660335..66f26eefed 100644 --- a/main/bridge_channel.c +++ b/main/bridge_channel.c @@ -2117,13 +2117,14 @@ int bridge_channel_internal_push_full(struct ast_bridge_channel *bridge_channel, if (bridge->dissolved || bridge_channel->state != BRIDGE_CHANNEL_STATE_WAIT || (swap && swap->state != BRIDGE_CHANNEL_STATE_WAIT) - || bridge->v_table->push(bridge, bridge_channel, swap) - || ast_bridge_channel_establish_roles(bridge_channel)) { + || bridge->v_table->push(bridge, bridge_channel, swap)) { ast_debug(1, "Bridge %s: pushing %p(%s) into bridge failed\n", bridge->uniqueid, bridge_channel, ast_channel_name(bridge_channel->chan)); return -1; } + ast_bridge_channel_establish_roles(bridge_channel); + if (swap) { int dissolve = ast_test_flag(&bridge->feature_flags, AST_BRIDGE_FLAG_DISSOLVE_EMPTY);