[asterisk-commits] rmudgett: branch 12 r399019 - /branches/12/main/bridge.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 12 18:34:29 CDT 2013
Author: rmudgett
Date: Thu Sep 12 18:34:28 2013
New Revision: 399019
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399019
Log:
astobj2: Register the bridges container for debug inspection.
Modified:
branches/12/main/bridge.c
Modified: branches/12/main/bridge.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/bridge.c?view=diff&rev=399019&r1=399018&r2=399019
==============================================================================
--- branches/12/main/bridge.c (original)
+++ branches/12/main/bridge.c Thu Sep 12 18:34:28 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