From: Jason Parker Date: Thu, 12 Aug 2010 22:49:28 +0000 (+0000) Subject: Register CLI commands before parsing config, in case there is a config error. X-Git-Tag: 1.4.36-rc1~3^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e30457f0219c8ae0f730e6439118ff1e75ab5a40;p=thirdparty%2Fasterisk.git Register CLI commands before parsing config, in case there is a config error. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282129 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 9c51b130c4..0bcdf78117 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -2475,13 +2475,14 @@ static int pbx_load_module(void) static int load_module(void) { - if (pbx_load_module()) - return AST_MODULE_LOAD_DECLINE; - + if (static_config && !write_protect_config) ast_cli_register(&cli_dialplan_save); ast_cli_register_multiple(cli_pbx_config, sizeof(cli_pbx_config) / sizeof(struct ast_cli_entry)); + if (pbx_load_module()) + return AST_MODULE_LOAD_DECLINE; + return 0; }