summaryrefslogtreecommitdiff
path: root/channels/dahdi
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-10-15 20:26:13 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-10-15 20:26:13 +0000
commit66e7dc041d3c69f2f5e793e113d0d017005ab36d (patch)
tree0a2db2ea7282694fae24befc75511e02ebfe10af /channels/dahdi
parent3208058831bbef189f71268076740ee70fe70507 (diff)
bridge_native_dahdi: Return channel join failure if could not make the channels compatible.
........ Merged revisions 401030 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/dahdi')
-rw-r--r--channels/dahdi/bridge_native_dahdi.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/channels/dahdi/bridge_native_dahdi.c b/channels/dahdi/bridge_native_dahdi.c
index 7505eca3e..74b912fe8 100644
--- a/channels/dahdi/bridge_native_dahdi.c
+++ b/channels/dahdi/bridge_native_dahdi.c
@@ -578,18 +578,17 @@ static int native_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chann
bridge_channel->tech_pvt = tech_pvt;
native_request_start(bridge);
+ /*
+ * Make the channels compatible in case the native bridge did
+ * not start for some reason and we need to fallback to 1-1
+ * bridging.
+ */
c0 = AST_LIST_FIRST(&bridge->channels)->chan;
c1 = AST_LIST_LAST(&bridge->channels)->chan;
- if (c0 != c1) {
- /*
- * Make the channels compatible in case the native bridge did
- * not start for some reason and we need to fallback to 1-1
- * bridging.
- */
- ast_channel_make_compatible(c0, c1);
+ if (c0 == c1) {
+ return 0;
}
-
- return 0;
+ return ast_channel_make_compatible(c0, c1);
}
/*!