[asterisk-commits] qwell: trunk r387738 - /trunk/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 6 12:01:42 CDT 2013


Author: qwell
Date: Mon May  6 12:01:41 2013
New Revision: 387738

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387738
Log:
Fix building with LOW_MEMORY defined.

Modified:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=387738&r1=387737&r2=387738
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Mon May  6 12:01:41 2013
@@ -410,18 +410,18 @@
 	 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;
 	const char *file;
 	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);
 
@@ -540,42 +540,6 @@
 		ast_free(x->name);
 		ast_free(x);
 	}
-}
-
-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 */
@@ -1092,6 +1056,42 @@
 }
 
 #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)
 {




More information about the asterisk-commits mailing list