diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-12 17:38:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-12 17:38:20 +0000 |
commit | ecadc01e3689e06686c482e458f526ab2a802e14 (patch) | |
tree | 0a037ef40892f659f6fa6b2c98ad4efcda6be7e6 /main/asterisk.c | |
parent | 92360e76ef53a06cbddd600193f1f6f17d60c50a (diff) |
Merged revisions 156164 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r156164 | russell | 2008-11-12 11:29:52 -0600 (Wed, 12 Nov 2008) | 7 lines
Move the sanity check that makes sure "always fork" is not set along with the
console option to be after the code that reads options from asterisk.conf.
This resolves a situation where Asterisk can start taking up 100% when
misconfigured.
(Thanks to Bryce Porter (x86 on IRC) for letting me log in to his system to
figure out what was causing the 100% CPU problem.)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156166 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 79e5e7be0..00b8df1e5 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3002,11 +3002,6 @@ int main(int argc, char *argv[]) if (ast_opt_console && !option_verbose) ast_verbose("[ Booting...\n"); - if (ast_opt_always_fork && (ast_opt_remote || ast_opt_console)) { - ast_log(LOG_WARNING, "'alwaysfork' is not compatible with console or remote console mode; ignored\n"); - ast_clear_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK); - } - /* For remote connections, change the name of the remote connection. * We do this for the benefit of init scripts (which need to know if/when * the main asterisk process has died yet). */ @@ -3017,8 +3012,10 @@ int main(int argc, char *argv[]) } } - if (ast_opt_console && !option_verbose) + if (ast_opt_console && !option_verbose) { ast_verbose("[ Reading Master Configuration ]\n"); + } + ast_readconfig(); if (ast_opt_remote && remotesock != NULL) @@ -3027,6 +3024,11 @@ int main(int argc, char *argv[]) if (!ast_language_is_prefix && !ast_opt_remote) ast_log(LOG_WARNING, "The 'languageprefix' option in asterisk.conf is deprecated; in a future release it will be removed, and your sound files will need to be organized in the 'new style' language layout.\n"); + if (ast_opt_always_fork && (ast_opt_remote || ast_opt_console)) { + ast_log(LOG_WARNING, "'alwaysfork' is not compatible with console or remote console mode; ignored\n"); + ast_clear_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK); + } + if (ast_opt_dump_core) { struct rlimit l; memset(&l, 0, sizeof(l)); |