[svn-commits] file: branch file/bridging r79010 - in /team/file/bridging: include/asterisk/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 10 10:31:35 CDT 2007


Author: file
Date: Fri Aug 10 10:31:34 2007
New Revision: 79010

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79010
Log:
Add extra debugging for finding the best bridge technology and change capability flags around.

Modified:
    team/file/bridging/include/asterisk/bridging.h
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/include/asterisk/bridging.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/bridging.h?view=diff&rev=79010&r1=79009&r2=79010
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Fri Aug 10 10:31:34 2007
@@ -29,10 +29,10 @@
 
 /*! \brief Capabilities for a bridge technology */
 enum ast_bridge_capability {
-	AST_BRIDGE_CAPABILITY_TRANSMIX = (0 << 0), /*! Move between bridge technologies as sources change to ensure the "best" use of technologies */
-	AST_BRIDGE_CAPABILITY_1TO1MIX = (1 << 0),  /*! Bridge is only capable of mixing 2 sources */
-	AST_BRIDGE_CAPABILITY_MULTIMIX = (2 << 0), /*! Bridge is capable of mixing 2+ sources */
-	AST_BRIDGE_CAPABILITY_NATIVE = (1 << 1),   /*! Bridge can natively bridge two channels */
+	AST_BRIDGE_CAPABILITY_TRANSMIX = (1 << 0), /*! Move between bridge technologies as sources change to ensure the "best" use of technologies */
+	AST_BRIDGE_CAPABILITY_1TO1MIX = (1 << 1),  /*! Bridge is only capable of mixing 2 sources */
+	AST_BRIDGE_CAPABILITY_MULTIMIX = (1 << 2), /*! Bridge is capable of mixing 2+ sources */
+	AST_BRIDGE_CAPABILITY_NATIVE = (1 << 3),   /*! Bridge can natively bridge two channels */
 };
 
 /*! \brief Preference for choosing the bridge technology */

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=79010&r1=79009&r2=79010
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Fri Aug 10 10:31:34 2007
@@ -215,12 +215,18 @@
 	AST_RWLIST_RDLOCK(&bridge_technologies);
 	AST_RWLIST_TRAVERSE(&bridge_technologies, current, list) {
 		ast_debug(1, "Bridge technology %s has capabilities %d and we want %d\n", current->name, current->capabilities, capabilities);
-		if (current->suspended)		      
+		if (current->suspended) {
+			ast_debug(1, "Bridge technology %s is suspended. Skipping.\n", current->name);
 			continue;
-		if (!(current->capabilities & capabilities))
+		}
+		if (!(current->capabilities & capabilities)) {
+			ast_debug(1, "Bridge technology %s does not have the capabilities we need.\n", current->name);
 			continue;
-		if (best && best->preference < current->preference)
+		}
+		if (best && best->preference < current->preference) {
+			ast_debug(1, "Bridge technology %s has preference %d while %s has preference %d. Skipping.\n", current->name, current->preference, best->name, best->preference);
 			continue;
+		}
 		best = current;
 	}
 	AST_RWLIST_UNLOCK(&bridge_technologies);




More information about the svn-commits mailing list