]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
bridge_native_dahdi: Return channel join failure if could not make the channels compa...
authorRichard Mudgett <rmudgett@digium.com>
Tue, 15 Oct 2013 20:25:37 +0000 (20:25 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 15 Oct 2013 20:25:37 +0000 (20:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401030 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/dahdi/bridge_native_dahdi.c

index 7505eca3ef572f7ba52ed331bde1a61abfb7dbf0..74b912fe866c11a0991b0aaa2c603cee66903c81 100644 (file)
@@ -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);
 }
 
 /*!