mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-27 22:50:42 +00:00
astobj2: Register the bridges container for debug inspection.
........ Merged revisions 399019 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4841,6 +4841,28 @@ static struct ast_cli_entry bridge_cli[] = {
|
|||||||
AST_CLI_DEFINE(handle_bridge_technology_suspend, "Suspend/unsuspend a bridge technology"),
|
AST_CLI_DEFINE(handle_bridge_technology_suspend, "Suspend/unsuspend a bridge technology"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \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
|
* \internal
|
||||||
* \brief Shutdown the bridging system.
|
* \brief Shutdown the bridging system.
|
||||||
@@ -4851,6 +4873,7 @@ static struct ast_cli_entry bridge_cli[] = {
|
|||||||
static void bridge_shutdown(void)
|
static void bridge_shutdown(void)
|
||||||
{
|
{
|
||||||
ast_cli_unregister_multiple(bridge_cli, ARRAY_LEN(bridge_cli));
|
ast_cli_unregister_multiple(bridge_cli, ARRAY_LEN(bridge_cli));
|
||||||
|
ao2_container_unregister("bridges");
|
||||||
ao2_cleanup(bridges);
|
ao2_cleanup(bridges);
|
||||||
bridges = NULL;
|
bridges = NULL;
|
||||||
ao2_cleanup(bridge_manager);
|
ao2_cleanup(bridge_manager);
|
||||||
@@ -4875,6 +4898,7 @@ int ast_bridging_init(void)
|
|||||||
if (!bridges) {
|
if (!bridges) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
ao2_container_register("bridges", bridges, bridge_prnt_obj);
|
||||||
|
|
||||||
ast_bridging_init_basic();
|
ast_bridging_init_basic();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user