summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-07-16 18:48:49 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-07-16 18:48:49 +0000
commit97321122611f48e005df96fc65fab754e24a27a4 (patch)
treec2a0905270e5bb015db107582181814fae233a47 /bridges
parent957f863dba85df0715e948f12984e81055485439 (diff)
Simplify bridge_simple chan join code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'bridges')
-rw-r--r--bridges/bridge_simple.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c
index 49e3a35ac..d2019866b 100644
--- a/bridges/bridge_simple.c
+++ b/bridges/bridge_simple.c
@@ -50,19 +50,14 @@ static int simple_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chann
struct ast_channel *c0 = AST_LIST_FIRST(&bridge->channels)->chan;
struct ast_channel *c1 = AST_LIST_LAST(&bridge->channels)->chan;
- /* If this is the first channel we can't make it compatible... unless we make it compatible with itself O.o */
- if (AST_LIST_FIRST(&bridge->channels) == AST_LIST_LAST(&bridge->channels)) {
+ /*
+ * If this is the first channel we can't make it compatible...
+ * unless we make it compatible with itself. O.o
+ */
+ if (c0 == c1) {
return 0;
}
- /* See if we need to make these compatible */
- if ((ast_format_cmp(ast_channel_writeformat(c0), ast_channel_readformat(c1)) == AST_FORMAT_CMP_EQUAL) &&
- (ast_format_cmp(ast_channel_readformat(c0), ast_channel_writeformat(c1)) == AST_FORMAT_CMP_EQUAL) &&
- (ast_format_cap_identical(ast_channel_nativeformats(c0), ast_channel_nativeformats(c1)))) {
- return 0;
- }
-
- /* BOOM! We do. */
return ast_channel_make_compatible(c0, c1);
}