summaryrefslogtreecommitdiff
path: root/tests/test_config.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-06-07 20:32:07 +0000
committerTerry Wilson <twilson@digium.com>2012-06-07 20:32:07 +0000
commit9f704b5d59a91879ba30b90b817090b71ca36afe (patch)
tree81595af089d9d278d737e5b7d98d3c974e44205b /tests/test_config.c
parentac6ec71fd23d4fe0ce9a7bdd43d9461b4732c713 (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 'tests/test_config.c')
-rw-r--r--tests/test_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_config.c b/tests/test_config.c
index 154b8241c..4d92c7913 100644
--- a/tests/test_config.c
+++ b/tests/test_config.c
@@ -811,7 +811,7 @@ AST_TEST_DEFINE(config_options_test)
aco_option_register(&cfg_info, "stropt", ACO_EXACT, config_test_conf.types, STR_DEFAULT, OPT_STRINGFIELD_T, 0, STRFLDSET(struct test_item, stropt));
aco_option_register_custom(&cfg_info, "customopt", ACO_EXACT, config_test_conf.types, CUSTOM_DEFAULT, customopt_handler, 0);
- if (aco_process_config(&cfg_info, 0)) {
+ if (aco_process_config(&cfg_info, 0) == ACO_PROCESS_ERROR) {
ast_test_status_update(test, "Could not parse config\n");
return AST_TEST_FAIL;
}