[asterisk-commits] mvanbaak: branch mvanbaak/res_clialiases_unconditional r151238 - in /team/mva...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Oct 19 19:14:17 CDT 2008
Author: mvanbaak
Date: Sun Oct 19 19:14:16 2008
New Revision: 151238
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151238
Log:
remove ast_atstart() stuff because we are not going to need it here
Modified:
team/mvanbaak/res_clialiases_unconditional/include/asterisk.h
team/mvanbaak/res_clialiases_unconditional/main/asterisk.c
Modified: team/mvanbaak/res_clialiases_unconditional/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/res_clialiases_unconditional/include/asterisk.h?view=diff&rev=151238&r1=151237&r2=151238
==============================================================================
--- team/mvanbaak/res_clialiases_unconditional/include/asterisk.h (original)
+++ team/mvanbaak/res_clialiases_unconditional/include/asterisk.h Sun Oct 19 19:14:16 2008
@@ -59,24 +59,6 @@
* \param func The callback function to unregister.
*/
void ast_unregister_atexit(void (*func)(void));
-
-/*!
- * \brief Register a function to be executed after Asterisk started.
- * \param func The callback function to use.
- *
- * \retval 0 on success.
- * \retval -1 on error.
- *
- * This function is called after all modules are loaded and the core initialization
- * is done. It's run just before the core logs 'Asterisk Ready' on the console.
- */
-int ast_register_atstart(void (*func)(void));
-
-/*!
- * \brief Unregister a function registered with ast_register_atstarted().
- * \param func The callback function to unregister.
- */
-void ast_unregister_atstart(void (*func)(void));
#if !defined(LOW_MEMORY)
/*!
Modified: team/mvanbaak/res_clialiases_unconditional/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/res_clialiases_unconditional/main/asterisk.c?view=diff&rev=151238&r1=151237&r2=151238
==============================================================================
--- team/mvanbaak/res_clialiases_unconditional/main/asterisk.c (original)
+++ team/mvanbaak/res_clialiases_unconditional/main/asterisk.c Sun Oct 19 19:14:16 2008
@@ -184,13 +184,6 @@
static AST_RWLIST_HEAD_STATIC(atexits, ast_atexit);
-struct ast_atstart {
- void (*func)(void);
- AST_LIST_ENTRY(ast_atstart) list;
-};
-
-static AST_LIST_HEAD_STATIC(atstarts, ast_atstart);
-
struct timeval ast_startuptime;
struct timeval ast_lastreloadtime;
@@ -809,44 +802,6 @@
if (ae)
free(ae);
-}
-
-int ast_register_atstart(void (*func)(void))
-{
- struct ast_atstart *ae;
-
- if (!(ae = ast_calloc(1, sizeof(*ae)))) {
- return -1;
- }
-
- ae->func = func;
-
- ast_unregister_atstart(func);
-
- AST_LIST_LOCK(&atstarts);
- AST_LIST_INSERT_HEAD(&atstarts, ae, list);
- AST_LIST_UNLOCK(&atstarts);
-
- return 0;
-}
-
-void ast_unregister_atstart(void (*func)(void))
-{
- struct ast_atstart *ae = NULL;
-
- AST_LIST_LOCK(&atstarts);
- AST_LIST_TRAVERSE_SAFE_BEGIN(&atstarts, ae, list) {
- if (ae->func == func) {
- AST_LIST_REMOVE_CURRENT(list);
- break;
- }
- }
- AST_LIST_TRAVERSE_SAFE_END;
- AST_LIST_UNLOCK(&atstarts);
-
- if (ae) {
- ast_free(ae);
- }
}
/* Sending commands from consoles back to the daemon requires a terminating NULL */
@@ -1369,18 +1324,6 @@
ae->func();
}
AST_RWLIST_UNLOCK(&atexits);
-}
-
-static void ast_run_atstarts(void)
-{
- struct ast_atstart *ae;
- AST_LIST_LOCK(&atstarts);
- AST_LIST_TRAVERSE(&atstarts, ae, list) {
- if (ae->func) {
- ae->func();
- }
- }
- AST_LIST_UNLOCK(&atstarts);
}
static void quit_handler(int num, int niceness, int safeshutdown, int restart)
@@ -3391,9 +3334,6 @@
dnsmgr_start_refresh();
- /* run commands for post startup */
- ast_run_atstarts();
-
/* We might have the option of showing a console, but for now just
do nothing... */
if (ast_opt_console && !option_verbose)
More information about the asterisk-commits
mailing list