[asterisk-commits] rmudgett: trunk r399020 - in /trunk: ./ main/bridge.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 12 18:36:35 CDT 2013


Author: rmudgett
Date: Thu Sep 12 18:36:33 2013
New Revision: 399020

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399020
Log:
astobj2: Register the bridges container for debug inspection.
........

Merged revisions 399019 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/main/bridge.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Thu Sep 12 18:36:33 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-398927,398938,398991,399017
+/branches/12:1-398558,398560-398577,398579-398927,398938,398991,399017,399019

Modified: trunk/main/bridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/bridge.c?view=diff&rev=399020&r1=399019&r2=399020
==============================================================================
--- trunk/main/bridge.c (original)
+++ trunk/main/bridge.c Thu Sep 12 18:36:33 2013
@@ -4843,6 +4843,28 @@
 
 /*!
  * \internal
+ * \brief Print bridge object key (name).
+ * \since 12.0.0
+ *
+ * \param v_obj A pointer to the object we want the key printed.
+ * \param where User data needed by prnt to determine where to put output.
+ * \param prnt Print output callback function to use.
+ *
+ * \return Nothing
+ */
+static void bridge_prnt_obj(void *v_obj, void *where, ao2_prnt_fn *prnt)
+{
+	struct ast_bridge *bridge = v_obj;
+
+	if (!bridge) {
+		return;
+	}
+	prnt(where, "%s %s chans:%d",
+		bridge->uniqueid, bridge->v_table->name, bridge->num_channels);
+}
+
+/*!
+ * \internal
  * \brief Shutdown the bridging system.
  * \since 12.0.0
  *
@@ -4851,6 +4873,7 @@
 static void bridge_shutdown(void)
 {
 	ast_cli_unregister_multiple(bridge_cli, ARRAY_LEN(bridge_cli));
+	ao2_container_unregister("bridges");
 	ao2_cleanup(bridges);
 	bridges = NULL;
 	ao2_cleanup(bridge_manager);
@@ -4875,6 +4898,7 @@
 	if (!bridges) {
 		return -1;
 	}
+	ao2_container_register("bridges", bridges, bridge_prnt_obj);
 
 	ast_bridging_init_basic();
 




More information about the asterisk-commits mailing list