diff options
author | Terry Wilson <twilson@digium.com> | 2012-07-12 21:43:09 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-07-12 21:43:09 +0000 |
commit | a7dfafdc56bf018e0acacdf0692d7c1eefd43d8d (patch) | |
tree | 49d810aa6e44b6d560daee3f776df732a2ada8d6 /tests/test_config.c | |
parent | 9773d2351b692a1639e02a1b7025f06e2f7775b7 (diff) |
Handle deprecated (aliased) option names with the config options api
Add a simple way to register "deprecated" option names that alias to a
different "current" name.
Review: https://reviewboard.asterisk.org/r/2026/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests/test_config.c')
-rw-r--r-- | tests/test_config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_config.c b/tests/test_config.c index 0c2816579..8eeb9f8a9 100644 --- a/tests/test_config.c +++ b/tests/test_config.c @@ -824,6 +824,8 @@ AST_TEST_DEFINE(config_options_test) aco_option_register(&cfg_info, "codecopt", ACO_EXACT, config_test_conf.types, CODEC_DEFAULT, OPT_CODEC_T, 1, FLDSET(struct test_item, codecprefopt, codeccapopt)); 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); + aco_option_register_deprecated(&cfg_info, "permit", config_test_conf.types, "aclpermitopt"); + aco_option_register_deprecated(&cfg_info, "deny", config_test_conf.types, "acldenyopt"); if (aco_process_config(&cfg_info, 0) == ACO_PROCESS_ERROR) { ast_test_status_update(test, "Could not parse config\n"); |