summaryrefslogtreecommitdiff
path: root/main/named_acl.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2012-07-19 20:37:10 +0000
committerJonathan Rose <jrose@digium.com>2012-07-19 20:37:10 +0000
commitded09e368240150145bf29d919ff84dec9f91d2b (patch)
tree48f236e67d2c111396a2150d5a11859d2f7905c4 /main/named_acl.c
parentd13e01578447d367462cb41c7da7281aadff2f17 (diff)
named_acl: Remove systemname option from acl.conf, use asterisk.conf value
Review: https://reviewboard.asterisk.org/r/2057/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/named_acl.c')
-rw-r--r--main/named_acl.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/main/named_acl.c b/main/named_acl.c
index 52487975e..cd6a8d68d 100644
--- a/main/named_acl.c
+++ b/main/named_acl.c
@@ -39,13 +39,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cli.h"
#include "asterisk/acl.h"
#include "asterisk/astobj2.h"
+#include "asterisk/paths.h"
#define NACL_CONFIG "acl.conf"
#define ACL_FAMILY "acls"
struct named_acl_global_config {
AST_DECLARE_STRING_FIELDS(
- AST_STRING_FIELD(systemname);
+ /* Nothing here yet. */
);
};
@@ -263,12 +264,8 @@ static struct named_acl *named_acl_find_realtime(const char *name)
struct ast_ha *built_ha = NULL;
struct named_acl *acl;
- RAII_VAR(struct named_acl_config *, acl_options, ao2_global_obj_ref(globals), ao2_cleanup);
-
/* If we have a systemname set in the global options, we only want to retrieve entries with a matching systemname field. */
- if (acl_options) {
- systemname = acl_options->global->systemname;
- }
+ systemname = ast_config_AST_SYSTEM_NAME;
if (ast_strlen_zero(systemname)) {
cfg = ast_load_realtime_multientry(ACL_FAMILY, "name", name, SENTINEL);
@@ -543,9 +540,6 @@ int ast_named_acl_init()
return 0;
}
- /* Register the global options */
- aco_option_register(&cfg_info, "systemname", ACO_EXACT, global_options, NULL, OPT_STRINGFIELD_T, 0, STRFLDSET(struct named_acl_global_config, systemname));
-
/* Register the per level options. */
aco_option_register(&cfg_info, "permit", ACO_EXACT, named_acl_types, NULL, OPT_ACL_T, 1, FLDSET(struct named_acl, ha));
aco_option_register(&cfg_info, "deny", ACO_EXACT, named_acl_types, NULL, OPT_ACL_T, 0, FLDSET(struct named_acl, ha));