[svn-commits] rizzo: trunk r89465 - in /trunk: build_tools/ include/ include/asterisk/ main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Nov 20 16:18:22 CST 2007
Author: rizzo
Date: Tue Nov 20 16:18:21 2007
New Revision: 89465
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89465
Log:
move internal function declarations to include/asterisk/_private.h
Added:
trunk/include/asterisk/_private.h (with props)
Modified:
trunk/build_tools/strip_nonapi
trunk/include/asterisk.h
trunk/main/asterisk.c
trunk/main/astobj2.c
trunk/main/channel.c
trunk/main/cli.c
trunk/main/db.c
trunk/main/devicestate.c
trunk/main/dnsmgr.c
trunk/main/event.c
trunk/main/frame.c
trunk/main/loader.c
trunk/main/logger.c
trunk/main/manager.c
trunk/main/pbx.c
trunk/main/term.c
trunk/main/threadstorage.c
Modified: trunk/build_tools/strip_nonapi
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/strip_nonapi?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/build_tools/strip_nonapi (original)
+++ trunk/build_tools/strip_nonapi Tue Nov 20 16:18:21 2007
@@ -18,7 +18,7 @@
FILTER="${GREP} -v -e ^ast_ -e ^_ast_ -e ^__ast_ -e ^astman_ -e ^pbx_"
case "${OSARCH}" in
- linux-gnu)
+ linux-gnu|FreeBSD)
nm ${1} | ${GREP} -e " T " | cut -d" " -f3 | ${FILTER} > striplist
sed -e "s/^/-N /" striplist | xargs ${STRIP} ${1}
rm -f striplist
Modified: trunk/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk.h?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/include/asterisk.h (original)
+++ trunk/include/asterisk.h Tue Nov 20 16:18:21 2007
@@ -50,40 +50,6 @@
#define sched_setscheduler __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__
int ast_set_priority(int); /*!< Provided by asterisk.c */
-int load_modules(unsigned int); /*!< Provided by loader.c */
-int load_pbx(void); /*!< Provided by pbx.c */
-int init_logger(void); /*!< Provided by logger.c */
-void close_logger(void); /*!< Provided by logger.c */
-int reload_logger(int); /*!< Provided by logger.c */
-int init_framer(void); /*!< Provided by frame.c */
-int ast_term_init(void); /*!< Provided by term.c */
-int astdb_init(void); /*!< Provided by db.c */
-void ast_channels_init(void); /*!< Provided by channel.c */
-void ast_builtins_init(void); /*!< Provided by cli.c */
-int dnsmgr_init(void); /*!< Provided by dnsmgr.c */
-void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */
-int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */
-void threadstorage_init(void); /*!< Provided by threadstorage.c */
-void ast_event_init(void); /*!< Provided by event.c */
-int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
-int astobj2_init(void); /*! Provided by astobj2.c */
-
-/*!
- * \brief Reload asterisk modules.
- * \param name the name of the module to reload
- *
- * This function reloads the specified module, or if no modules are specified,
- * it will reload all loaded modules.
- *
- * \note Modules are reloaded using their reload() functions, not unloading
- * them and loading them again.
- *
- * \return 0 if the specified module was not found.
- * \retval 1 if the module was found but cannot be reloaded.
- * \retval -1 if a reload operation is already in progress.
- * \retval 2 if the specfied module was found and reloaded.
- */
-int ast_module_reload(const char *name);
/*!
* \brief Register a function to be executed before Asterisk exits.
Added: trunk/include/asterisk/_private.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/_private.h?view=auto&rev=89465
==============================================================================
--- trunk/include/asterisk/_private.h (added)
+++ trunk/include/asterisk/_private.h Tue Nov 20 16:18:21 2007
@@ -1,0 +1,44 @@
+/*
+ * Prototypes for public functions only of internal interest,
+ * normally not used by modules.
+ * What goes here are typically *_init() routines.
+ */
+
+#ifndef _ASTERISK__PRIVATE_H
+#define _ASTERISK__PRIVATE_H
+
+int load_modules(unsigned int); /*!< Provided by loader.c */
+int load_pbx(void); /*!< Provided by pbx.c */
+int init_logger(void); /*!< Provided by logger.c */
+void close_logger(void); /*!< Provided by logger.c */
+int init_framer(void); /*!< Provided by frame.c */
+int ast_term_init(void); /*!< Provided by term.c */
+int astdb_init(void); /*!< Provided by db.c */
+void ast_channels_init(void); /*!< Provided by channel.c */
+void ast_builtins_init(void); /*!< Provided by cli.c */
+int dnsmgr_init(void); /*!< Provided by dnsmgr.c */
+void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */
+int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */
+void threadstorage_init(void); /*!< Provided by threadstorage.c */
+void ast_event_init(void); /*!< Provided by event.c */
+int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
+int astobj2_init(void); /*! Provided by astobj2.c */
+
+/*!
+ * \brief Reload asterisk modules.
+ * \param name the name of the module to reload
+ *
+ * This function reloads the specified module, or if no modules are specified,
+ * it will reload all loaded modules.
+ *
+ * \note Modules are reloaded using their reload() functions, not unloading
+ * them and loading them again.
+ *
+ * \return 0 if the specified module was not found.
+ * \retval 1 if the module was found but cannot be reloaded.
+ * \retval -1 if a reload operation is already in progress.
+ * \retval 2 if the specfied module was found and reloaded.
+ */
+int ast_module_reload(const char *name);
+
+#endif /* _ASTERISK__PRIVATE_H */
Propchange: trunk/include/asterisk/_private.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/include/asterisk/_private.h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/include/asterisk/_private.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Nov 20 16:18:21 2007
@@ -60,6 +60,8 @@
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/_private.h"
#undef sched_setscheduler
#undef setpriority
Modified: trunk/main/astobj2.c
URL: http://svn.digium.com/view/asterisk/trunk/main/astobj2.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Tue Nov 20 16:18:21 2007
@@ -21,6 +21,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/astobj2.h"
#include "asterisk/utils.h"
#include "asterisk/cli.h"
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Nov 20 16:18:21 2007
@@ -26,6 +26,8 @@
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/signal.h>
#include <signal.h>
#include <ctype.h>
Modified: trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/trunk/main/db.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Tue Nov 20 16:18:21 2007
@@ -31,6 +31,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
#include <dirent.h>
Modified: trunk/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/devicestate.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Tue Nov 20 16:18:21 2007
@@ -112,6 +112,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/channel.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
Modified: trunk/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/dnsmgr.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/dnsmgr.c (original)
+++ trunk/main/dnsmgr.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <regex.h>
#include <signal.h>
Modified: trunk/main/event.c
URL: http://svn.digium.com/view/asterisk/trunk/main/event.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/event.c (original)
+++ trunk/main/event.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/event.h"
#include "asterisk/linkedlists.h"
#include "asterisk/lock.h"
Modified: trunk/main/frame.c
URL: http://svn.digium.com/view/asterisk/trunk/main/frame.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/frame.c (original)
+++ trunk/main/frame.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/lock.h"
#include "asterisk/frame.h"
#include "asterisk/options.h"
Modified: trunk/main/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/main/loader.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Tue Nov 20 16:18:21 2007
@@ -31,6 +31,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <dirent.h>
#include "asterisk/linkedlists.h"
Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Tue Nov 20 16:18:21 2007
@@ -25,14 +25,17 @@
* \author Mark Spencer <markster at digium.com>
*/
-/* Prevent inclusion of logger.h - it redefines LOG_* which we need
- * to define syslog_level_map. Later, we force its inclusion again.
+/*
+ * define _ASTERISK_LOGGER_H to prevent the inclusion of logger.h;
+ * it redefines LOG_* which we need to define syslog_level_map.
+ * Later, we force the inclusion of logger.h again.
*/
#define _ASTERISK_LOGGER_H
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <signal.h>
#include <time.h>
#include <sys/stat.h>
@@ -511,7 +514,7 @@
return res;
}
-int reload_logger(int rotate)
+static int reload_logger(int rotate)
{
char old[PATH_MAX] = "";
int event_rotate = rotate, queue_rotate = rotate;
Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Nov 20 16:18:21 2007
@@ -45,6 +45,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <ctype.h>
#include <sys/time.h>
#include <signal.h>
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <ctype.h>
#include <time.h>
#include <sys/time.h>
Modified: trunk/main/term.c
URL: http://svn.digium.com/view/asterisk/trunk/main/term.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/term.c (original)
+++ trunk/main/term.c Tue Nov 20 16:18:21 2007
@@ -27,6 +27,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
#include <sys/stat.h>
Modified: trunk/main/threadstorage.c
URL: http://svn.digium.com/view/asterisk/trunk/main/threadstorage.c?view=diff&rev=89465&r1=89464&r2=89465
==============================================================================
--- trunk/main/threadstorage.c (original)
+++ trunk/main/threadstorage.c Tue Nov 20 16:18:21 2007
@@ -24,8 +24,15 @@
*/
#include "asterisk.h"
-
-#if defined(DEBUG_THREADLOCALS)
+#include "asterisk/_private.h"
+
+#if !defined(DEBUG_THREADLOCALS)
+
+void threadstorage_init(void)
+{
+}
+
+#else /* !defined(DEBUG_THREADLOCALS) */
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -226,11 +233,5 @@
ast_cli_register_multiple(cli, sizeof(cli) / sizeof(cli[0]));
}
-#else /* !defined(DEBUG_THREADLOCALS) */
-
-void threadstorage_init(void)
-{
-}
-
#endif /* !defined(DEBUG_THREADLOCALS) */
More information about the svn-commits
mailing list