summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-05-03 18:03:26 +0000
committerJonathan Rose <jrose@digium.com>2013-05-03 18:03:26 +0000
commit1eac5a798899713501ae9f647ecd8b035f74eecd (patch)
tree34e40bff5805f7a117856f4078773aea16f2f8de /main/asterisk.c
parente236c2ea36f9b9e84e40ebf9cf0baf8d0ce04322 (diff)
Stasis: Convert network change events into network change stasis messages
(issue ASTERISK-21103) Review: https://reviewboard.asterisk.org/r/2490/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index f9ff163e6..3a1584322 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3560,6 +3560,26 @@ static void env_init(void)
setenv("AST_VERSION", ast_get_version(), 1);
}
+static struct stasis_topic *system_topic;
+
+static struct stasis_message_type *network_change_type;
+
+struct stasis_topic *ast_system_topic(void)
+{
+ return system_topic;
+}
+
+struct stasis_message_type *ast_network_change_type(void)
+{
+ return network_change_type;
+}
+
+static void stasis_system_topic_init(void)
+{
+ system_topic = stasis_topic_create("ast_system");
+ network_change_type = stasis_message_type_create("network_change");
+}
+
static void print_intro_message(const char *runuser, const char *rungroup)
{
if (ast_opt_console || option_verbose || (ast_opt_remote && !ast_opt_exec)) {
@@ -4127,6 +4147,7 @@ int main(int argc, char *argv[])
printf("Stasis initialization failed.\n%s", term_quit());
exit(1);
}
+ stasis_system_topic_init();
ast_makesocket();
sigemptyset(&sigs);