[asterisk-commits] rmudgett: trunk r394470 - /trunk/bridges/bridge_simple.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 16 13:48:51 CDT 2013
Author: rmudgett
Date: Tue Jul 16 13:48:49 2013
New Revision: 394470
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394470
Log:
Simplify bridge_simple chan join code.
Modified:
trunk/bridges/bridge_simple.c
Modified: trunk/bridges/bridge_simple.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_simple.c?view=diff&rev=394470&r1=394469&r2=394470
==============================================================================
--- trunk/bridges/bridge_simple.c (original)
+++ trunk/bridges/bridge_simple.c Tue Jul 16 13:48:49 2013
@@ -50,19 +50,14 @@
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);
}
More information about the asterisk-commits
mailing list