summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2013-05-06 17:01:41 +0000
committerJason Parker <jparker@digium.com>2013-05-06 17:01:41 +0000
commit6b4da0959b232f24d8456508f7b2e9644e61f1c3 (patch)
treedee93496e4c56d2c1379e2006d0ba2fa29c09c48 /main
parent049345c323200041c7c7395114850d7f5eac6c13 (diff)
Fix building with LOW_MEMORY defined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 7807ad627..b8deab1d4 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -410,6 +410,12 @@ 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 */
+static struct stasis_message_type *network_change_type;
+
#if !defined(LOW_MEMORY)
struct file_version {
AST_RWLIST_ENTRY(file_version) list;
@@ -417,12 +423,6 @@ struct file_version {
char *version;
};
-/*! \brief The \ref stasis topic for system level changes */
-static struct stasis_topic *system_topic;
-
-/*!\ brief The \ref stasis_message_type for network changes */
-static struct stasis_message_type *network_change_type;
-
static AST_RWLIST_HEAD_STATIC(file_versions, file_version);
void ast_register_file_version(const char *file, const char *version)
@@ -542,42 +542,6 @@ void ast_unregister_thread(void *id)
}
}
-struct stasis_topic *ast_system_topic(void)
-{
- return system_topic;
-}
-
-struct stasis_message_type *ast_network_change_type(void)
-{
- return network_change_type;
-}
-
-/*! \brief Cleanup the \ref stasis system level items */
-static void stasis_system_topic_cleanup(void)
-{
- ao2_ref(system_topic, -1);
- system_topic = NULL;
- ao2_ref(network_change_type, -1);
- network_change_type = NULL;
-}
-
-/*! \brief Initialize the system level items for \ref stasis */
-static int stasis_system_topic_init(void)
-{
- ast_register_atexit(stasis_system_topic_cleanup);
-
- system_topic = stasis_topic_create("ast_system");
- if (!system_topic) {
- return 1;
- }
-
- network_change_type = stasis_message_type_create("network_change");
- if (!network_change_type) {
- return -1;
- }
- return 0;
-}
-
/*! \brief Give an overview of core settings */
static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
@@ -1093,6 +1057,42 @@ 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;
+}
+
+struct stasis_message_type *ast_network_change_type(void)
+{
+ return network_change_type;
+}
+
+/*! \brief Cleanup the \ref stasis system level items */
+static void stasis_system_topic_cleanup(void)
+{
+ ao2_ref(system_topic, -1);
+ system_topic = NULL;
+ ao2_ref(network_change_type, -1);
+ network_change_type = NULL;
+}
+
+/*! \brief Initialize the system level items for \ref stasis */
+static int stasis_system_topic_init(void)
+{
+ ast_register_atexit(stasis_system_topic_cleanup);
+
+ system_topic = stasis_topic_create("ast_system");
+ if (!system_topic) {
+ return 1;
+ }
+
+ network_change_type = stasis_message_type_create("network_change");
+ if (!network_change_type) {
+ return -1;
+ }
+ return 0;
+}
+
static void ast_run_atexits(void)
{
struct ast_atexit *ae;