[svn-commits] rmudgett: branch group/bridge_construction r384372 - in /team/group/bridge_co...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 29 15:24:46 CDT 2013


Author: rmudgett
Date: Fri Mar 29 15:24:43 2013
New Revision: 384372

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384372
Log:
Give ast_bridge a UUID for messaging and other purposes.

Modified:
    team/group/bridge_construction/include/asterisk/bridging.h
    team/group/bridge_construction/main/bridging.c

Modified: team/group/bridge_construction/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/include/asterisk/bridging.h?view=diff&rev=384372&r1=384371&r2=384372
==============================================================================
--- team/group/bridge_construction/include/asterisk/bridging.h (original)
+++ team/group/bridge_construction/include/asterisk/bridging.h Fri Mar 29 15:24:43 2013
@@ -72,6 +72,7 @@
 #include "asterisk/bridging_features.h"
 #include "asterisk/bridging_roles.h"
 #include "asterisk/dsp.h"
+#include "asterisk/uuid.h"
 
 /*! \brief Capabilities for a bridge technology */
 enum ast_bridge_capability {
@@ -337,6 +338,8 @@
 struct ast_bridge {
 	/*! Bridge virtual method table. */
 	const struct ast_bridge_methods *v_table;
+	/*! Immutable bridge UUID. */
+	char uniqueid[AST_UUID_STR_LEN];
 	/*! Bridge technology that is handling the bridge */
 	struct ast_bridge_technology *technology;
 	/*! Private information unique to the bridge technology */

Modified: team/group/bridge_construction/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/bridging.c?view=diff&rev=384372&r1=384371&r2=384372
==============================================================================
--- team/group/bridge_construction/main/bridging.c (original)
+++ team/group/bridge_construction/main/bridging.c Fri Mar 29 15:24:43 2013
@@ -474,9 +474,8 @@
 
 	/* Add channel to the bridge */
 	if (bridge->v_table->push(bridge, bridge_channel, swap)) {
-/* BUGBUG need to use bridge id in the diagnostic message */
-		ast_log(LOG_ERROR, "Pushing channel %s into bridge %p failed\n",
-			ast_channel_name(bridge_channel->chan), bridge);
+		ast_log(LOG_ERROR, "Failed to push channel %s into bridge %s\n",
+			ast_channel_name(bridge_channel->chan), bridge->uniqueid);
 		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
 		return;
 	}
@@ -952,6 +951,7 @@
 		return NULL;
 	}
 
+	ast_uuid_generate_str(self->uniqueid, sizeof(self->uniqueid));
 	ast_set_flag(&self->feature_flags, flags);
 
 	/* If we need to be a smart bridge see if we can move between 1to1 and multimix bridges */
@@ -1247,9 +1247,8 @@
 				bridge);
 			return 0;
 		}
-/* BUGBUG need to output the bridge id for tracking why. */
-		ast_log(LOG_WARNING, "No bridge technology available to support bridge %p\n",
-			bridge);
+		ast_log(LOG_WARNING, "No bridge technology available to support bridge %s\n",
+			bridge->uniqueid);
 		return -1;
 	}
 
@@ -1299,9 +1298,8 @@
 	ast_debug(1, "Calling bridge technology %s constructor for bridge %p\n",
 		new_technology->name, bridge);
 	if (new_technology->create && new_technology->create(bridge)) {
-/* BUGBUG need to output the bridge id for tracking why. */
-		ast_log(LOG_WARNING, "Bridge technology %s for bridge %p failed to get setup\n",
-			new_technology->name, bridge);
+		ast_log(LOG_WARNING, "Failed to setup bridge technology %s for bridge %s\n",
+			new_technology->name, bridge->uniqueid);
 		bridge->tech_pvt = dummy_bridge.tech_pvt;
 		bridge->technology = dummy_bridge.technology;
 		ast_module_unref(new_technology->mod);




More information about the svn-commits mailing list