Fix documentation replication issues
[asterisk/asterisk.git] / apps / confbridge / confbridge_manager.c
index 8931c1f..e6e859f 100644 (file)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "asterisk/channel.h"
-#include "asterisk/bridging.h"
+#include "asterisk/bridge.h"
 #include "asterisk/stasis.h"
 #include "asterisk/stasis_channels.h"
-#include "asterisk/stasis_bridging.h"
+#include "asterisk/stasis_bridges.h"
 #include "asterisk/manager.h"
 #include "asterisk/stasis_message_router.h"
 #include "include/confbridge.h"
@@ -44,7 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeEnd</ref>
@@ -59,7 +59,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeStart</ref>
@@ -74,8 +74,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeLeave</ref>
@@ -90,8 +90,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeJoin</ref>
@@ -106,7 +106,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeStopRecord</ref>
@@ -121,7 +121,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeRecord</ref>
@@ -136,8 +136,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeUnmute</ref>
@@ -152,8 +152,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">ConfbridgeMute</ref>
@@ -161,7 +161,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                        </see-also>
                </managerEventInstance>
        </managerEvent>
-
        <managerEvent language="en_US" name="ConfbridgeTalking">
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a confbridge participant unmutes.</synopsis>
@@ -169,8 +168,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                <parameter name="Conference">
                                        <para>The name of the Confbridge conference.</para>
                                </parameter>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='BridgeCreate']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <bridge_snapshot/>
+                               <channel_snapshot/>
                                <parameter name="TalkingStatus">
                                        <enumlist>
                                                <enum name="on"/>
@@ -195,14 +194,17 @@ static void confbridge_publish_manager_event(
 {
        struct ast_bridge_blob *blob = stasis_message_data(message);
        const char *conference_name;
-       RAII_VAR(struct ast_str *, bridge_text,
-               ast_manager_build_bridge_state_string(blob->bridge, ""),
-               ast_free);
+       RAII_VAR(struct ast_str *, bridge_text, NULL, ast_free);
        RAII_VAR(struct ast_str *, channel_text, NULL, ast_free);
 
        ast_assert(blob != NULL);
        ast_assert(event != NULL);
 
+       bridge_text = ast_manager_build_bridge_state_string(blob->bridge, "");
+       if (!bridge_text) {
+               return;
+       }
+
        conference_name = ast_json_string_get(ast_json_object_get(blob->blob, "conference"));
        ast_assert(conference_name != NULL);
 
@@ -341,7 +343,7 @@ int manager_confbridge_init(void)
        STASIS_MESSAGE_TYPE_INIT(confbridge_talking_type);
 
        bridge_state_router = stasis_message_router_create(
-               stasis_caching_get_topic(ast_bridge_topic_all_cached()));
+               ast_bridge_topic_all_cached());
 
        if (!bridge_state_router) {
                return -1;
@@ -412,7 +414,7 @@ int manager_confbridge_init(void)
        }
 
        channel_state_router = stasis_message_router_create(
-               stasis_caching_get_topic(ast_channel_topic_all_cached()));
+               ast_channel_topic_all_cached());
 
        if (!channel_state_router) {
                manager_confbridge_shutdown();