[asterisk-commits] kmoore: branch kmoore/bridge_construction-cel_channels r389078 - /team/kmoore...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat May 18 16:00:07 CDT 2013
Author: kmoore
Date: Sat May 18 16:00:04 2013
New Revision: 389078
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389078
Log:
Pull forward some changes from the bridge refactor
Modified:
team/kmoore/bridge_construction-cel_channels/main/cel.c
Modified: team/kmoore/bridge_construction-cel_channels/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_channels/main/cel.c?view=diff&rev=389078&r1=389077&r2=389078
==============================================================================
--- team/kmoore/bridge_construction-cel_channels/main/cel.c (original)
+++ team/kmoore/bridge_construction-cel_channels/main/cel.c Sat May 18 16:00:04 2013
@@ -57,6 +57,8 @@
#include "asterisk/astobj2.h"
#include "asterisk/stasis_message_router.h"
#include "asterisk/stasis_channels.h"
+#include "asterisk/stasis_bridging.h"
+#include "asterisk/bridging.h"
/*! Message router for state that CEL needs to know about */
static struct stasis_message_router *cel_state_router;
@@ -66,6 +68,9 @@
/*! Subscription for forwarding the channel caching topic */
static struct stasis_subscription *cel_channel_forwarder;
+
+/*! Subscription for forwarding the channel caching topic */
+static struct stasis_subscription *cel_bridge_forwarder;
/*! Container for dial end multichannel blobs for holding on to dial statuses */
static struct ao2_container *cel_dialstatus_store;
@@ -947,6 +952,7 @@
for (i = 0; i < ARRAY_LEN(cel_channel_monitors); ++i) {
cel_channel_monitors[i](old_snapshot, new_snapshot);
}
+ } else if (update->type == ast_bridge_snapshot_type()) {
}
}
@@ -979,11 +985,14 @@
ao2_cleanup(cel_state_topic);
cel_state_topic = NULL;
cel_channel_forwarder = stasis_unsubscribe(cel_channel_forwarder);
+ cel_bridge_forwarder = stasis_unsubscribe(cel_bridge_forwarder);
ao2_cleanup(appset);
appset = NULL;
ao2_cleanup(linkedids);
linkedids = NULL;
ast_cli_unregister(&cli_status);
+ stasis_message_router_unsubscribe(cel_state_router);
+ cel_state_router = NULL;
}
int ast_cel_engine_init(void)
@@ -992,6 +1001,7 @@
if (!(appset = ast_str_container_alloc(NUM_APP_BUCKETS))) {
return -1;
}
+
if (!(linkedids = ast_str_container_alloc(NUM_APP_BUCKETS))) {
return -1;
}
@@ -1009,8 +1019,17 @@
return -1;
}
- cel_channel_forwarder = stasis_forward_all(stasis_caching_get_topic(ast_channel_topic_all_cached()), cel_state_topic);
+ cel_channel_forwarder = stasis_forward_all(
+ stasis_caching_get_topic(ast_channel_topic_all_cached()),
+ cel_state_topic);
if (!cel_channel_forwarder) {
+ return -1;
+ }
+
+ cel_bridge_forwarder = stasis_forward_all(
+ stasis_caching_get_topic(ast_bridge_topic_all_cached()),
+ cel_state_topic);
+ if (!cel_bridge_forwarder) {
return -1;
}
More information about the asterisk-commits
mailing list