diff options
author | Terry Wilson <twilson@digium.com> | 2012-06-07 20:32:07 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-06-07 20:32:07 +0000 |
commit | 9f704b5d59a91879ba30b90b817090b71ca36afe (patch) | |
tree | 81595af089d9d278d737e5b7d98d3c974e44205b /apps | |
parent | ac6ec71fd23d4fe0ce9a7bdd43d9461b4732c713 (diff) |
Fix reloading an unchanged file with the Config Options API
Adding multiple file support broke reloading an unchanged file. This
adds an enum for return values for the aco_process_* functions and
ensures that the config is not applied if res is not ACO_PROCESS_OK.
Review: https://reviewboard.asterisk.org/r/1979/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_skel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_skel.c b/apps/app_skel.c index 02f09d717..ca96fa08f 100644 --- a/apps/app_skel.c +++ b/apps/app_skel.c @@ -633,7 +633,7 @@ static struct ast_cli_entry skel_cli[] = { static int reload_module(void) { - if (aco_process_config(&cfg_info, 1)) { + if (aco_process_config(&cfg_info, 1) == ACO_PROCESS_ERROR) { return AST_MODULE_LOAD_DECLINE; } @@ -673,7 +673,7 @@ static int load_module(void) aco_option_register(&cfg_info, "max_number", ACO_EXACT, level_options, NULL, OPT_UINT_T, 0, FLDSET(struct skel_level, max_num)); aco_option_register(&cfg_info, "max_guesses", ACO_EXACT, level_options, NULL, OPT_UINT_T, 1, FLDSET(struct skel_level, max_guesses)); - if (aco_process_config(&cfg_info, 0)) { + if (aco_process_config(&cfg_info, 0) == ACO_PROCESS_ERROR) { goto error; } |