summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2013-07-08 14:42:57 +0000
committerJason Parker <jparker@digium.com>2013-07-08 14:42:57 +0000
commit7422581b6d4921cebfcf177fc63b2ef852fdef58 (patch)
treefd0fbaa5ca5cdef688476d46a942a8260bf756e9 /main/asterisk.c
parent30d379851e2d614d1b8bcc65fdb5952feb6d62de (diff)
Move channel driver Registry manager events to core.
This also shuffles the stasis system topic and related handling. (closes issue ASTERISK-21488) Review: https://reviewboard.asterisk.org/r/2631/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index b8cf43e37..c7c67e795 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -243,6 +243,7 @@ int daemon(int, int); /* defined in libresolv of all places */
#include "asterisk/stasis.h"
#include "asterisk/json.h"
#include "asterisk/stasis_endpoints.h"
+#include "asterisk/stasis_system.h"
#include "asterisk/security_events.h"
#include "../defaults.h"
@@ -448,12 +449,6 @@ static struct {
unsigned int need_quit_handler:1;
} sig_flags;
-/*! \brief The \ref stasis topic for system level changes */
-static struct stasis_topic *system_topic;
-
-/*!\ brief The \ref stasis_message_type for network changes */
-STASIS_MESSAGE_TYPE_DEFN(ast_network_change_type);
-
#if !defined(LOW_MEMORY)
struct file_version {
AST_RWLIST_ENTRY(file_version) list;
@@ -461,9 +456,6 @@ struct file_version {
char *version;
};
-/*! \brief The \ref stasis topic for system level changes */
-static struct stasis_topic *system_topic;
-
static AST_RWLIST_HEAD_STATIC(file_versions, file_version);
void ast_register_file_version(const char *file, const char *version)
@@ -1098,36 +1090,6 @@ static char *handle_show_version_files(struct ast_cli_entry *e, int cmd, struct
#endif /* ! LOW_MEMORY */
-struct stasis_topic *ast_system_topic(void)
-{
- return system_topic;
-}
-
-/*! \brief Cleanup the \ref stasis system level items */
-static void stasis_system_topic_cleanup(void)
-{
- ao2_cleanup(system_topic);
- system_topic = NULL;
- STASIS_MESSAGE_TYPE_CLEANUP(ast_network_change_type);
-}
-
-/*! \brief Initialize the system level items for \ref stasis */
-static int stasis_system_topic_init(void)
-{
- ast_register_cleanup(stasis_system_topic_cleanup);
-
- system_topic = stasis_topic_create("ast_system");
- if (!system_topic) {
- return 1;
- }
-
- if (STASIS_MESSAGE_TYPE_INIT(ast_network_change_type) != 0) {
- return -1;
- }
-
- return 0;
-}
-
static void publish_fully_booted(void)
{
RAII_VAR(struct ast_json *, json_object, NULL, ast_json_unref);
@@ -4218,7 +4180,7 @@ int main(int argc, char *argv[])
exit(1);
}
- if (stasis_system_topic_init()) {
+ if (ast_stasis_system_init()) {
printf("Stasis system-level information initialization failed.\n%s", term_quit());
exit(1);
}