]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use "namespace" instead of "parent".
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Feb 2023 21:30:21 +0000 (16:30 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Feb 2023 11:22:26 +0000 (06:22 -0500)
There are too many things called "parent" already

src/bin/unit_test_attribute.c
src/lib/server/map.c
src/lib/server/tmpl.h
src/lib/server/tmpl_tokenize.c
src/lib/unlang/compile.c

index 73df9e9dab042d8bba93ae10aa5d02a3999cf03f..8f2e5fe564deecd3dfa48bc78cf7c51d1560b36d 100644 (file)
@@ -2587,7 +2587,7 @@ static ssize_t command_tmpl_rule_attr_parent(UNUSED TALLOC_CTX *ctx, tmpl_rules_
        fr_slen_t               slen;
 
        slen = fr_dict_attr_by_oid_substr(&err,
-                                         &rules->attr.parent,
+                                         &rules->attr.namespace,
                                          rules->attr.dict_def ? fr_dict_root(rules->attr.dict_def) :
                                                                 fr_dict_root(fr_dict_internal()),
                                          value, NULL);
index bc9afcf5db3e684761b9ad3a507580531e0fc8f0..cf8bb9157a5ad401a9af139b94cbd1bace732139 100644 (file)
@@ -470,7 +470,7 @@ ssize_t map_afrom_substr(TALLOC_CTX *ctx, map_t **out, map_t **parent_p, fr_sbuf
                         */
                        if (is_child) {
                                fr_assert(tmpl_is_attr(parent->lhs));
-                               our_lhs_rules.attr.parent = tmpl_attr_tail_da(parent->lhs);
+                               our_lhs_rules.attr.namespace = tmpl_attr_tail_da(parent->lhs);
 
                                slen = tmpl_afrom_attr_substr(map, NULL, &map->lhs, &our_in,
                                                              &map_parse_rules_bareword_quoted, &our_lhs_rules);
@@ -854,22 +854,22 @@ do_children:
                         *      inner section.
                         */
                        our_lhs_rules.attr.prefix = TMPL_ATTR_REF_PREFIX_NO;
-                       our_lhs_rules.attr.parent = tmpl_attr_tail_da(map->lhs);
+                       our_lhs_rules.attr.namespace = tmpl_attr_tail_da(map->lhs);
 
                        /*
                         *      Groups MAY change dictionaries.  If so, then swap the dictionary and the parent.
                         */
-                       if (our_lhs_rules.attr.parent->type == FR_TYPE_GROUP) {
+                       if (our_lhs_rules.attr.namespace->type == FR_TYPE_GROUP) {
                                fr_dict_attr_t const *ref;
                                fr_dict_t const *dict, *internal;
 
-                               ref = fr_dict_attr_ref(our_lhs_rules.attr.parent);
+                               ref = fr_dict_attr_ref(our_lhs_rules.attr.namespace);
                                dict = fr_dict_by_da(ref);
                                internal = fr_dict_internal();
 
                                if ((dict != internal) && (dict != our_lhs_rules.attr.dict_def)) {
                                        our_lhs_rules.attr.dict_def = dict;
-                                       our_lhs_rules.attr.parent = ref;
+                                       our_lhs_rules.attr.namespace = ref;
                                }
                        }
 
index 776ba7f738c42dad203cdf43587e7dd3c016e90c..9567e86515ca10430e8ad72fd06318dbca622048 100644 (file)
@@ -271,7 +271,7 @@ struct tmpl_attr_rules_s {
        fr_dict_t const         *dict_def;              //!< Default dictionary to use
                                                        ///< with unqualified attribute references.
 
-       fr_dict_attr_t const    *parent;                //!< Point in dictionary tree to resume parsing
+       fr_dict_attr_t const    *namespace;             //!< Point in dictionary tree to resume parsing
                                                        ///< from.  If this is provided then dict_def
                                                        ///< request_def and list_def will be ignored
                                                        ///< and the presence of any of those qualifiers
index bbab57890f37199dcef9982a6f7c7ce9f8992901..5dbdbed2311431feacd74018248c091cea319aee 100644 (file)
@@ -572,7 +572,7 @@ static fr_slen_t tmpl_request_ref_list_from_substr(TALLOC_CTX *ctx, tmpl_attr_er
                        goto default_ref;
                }
 
-               if (at_rules->parent || at_rules->disallow_qualifiers) {
+               if (at_rules->namespace || at_rules->disallow_qualifiers) {
                        fr_strerror_const("It is not permitted to specify a request reference here");
                        if (err) *err = TMPL_ATTR_ERROR_INVALID_LIST_QUALIFIER;
 
@@ -2040,7 +2040,7 @@ ssize_t tmpl_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t *err,
         */
        ret = tmpl_attr_afrom_attr_substr(vpt, err,
                                          vpt,
-                                         at_rules->parent, at_rules->parent,
+                                         at_rules->namespace, at_rules->namespace,
                                          &our_name, p_rules, at_rules, 0);
        if (ret < 0) goto error;
 
@@ -5353,7 +5353,7 @@ void tmpl_rules_child_init(TALLOC_CTX *ctx, tmpl_rules_t *out, tmpl_rules_t cons
         */
        if (da->type != FR_TYPE_GROUP) {
                out->attr.dict_def = fr_dict_by_da(da);
-               out->attr.parent = da;
+               out->attr.namespace = da;
                return;
        }
 
@@ -5366,7 +5366,7 @@ void tmpl_rules_child_init(TALLOC_CTX *ctx, tmpl_rules_t *out, tmpl_rules_t cons
         */
        if ((dict != internal) && (dict != out->attr.dict_def)) {
                out->attr.dict_def = dict;
-               out->attr.parent = ref;
+               out->attr.namespace = ref;
        }
 
        /*
index f673cb355384a011699c3068858e61033778e18c..2cde92a2285752c7f6093124e8d043e6b4b10198 100644 (file)
@@ -2005,7 +2005,7 @@ static unlang_t *compile_variable(unlang_t *parent, unlang_compile_t *unlang_ctx
                t_rules->parent = unlang_ctx->rules;
 
                t_rules->attr.dict_def = var->dict;
-               t_rules->attr.parent = NULL;
+               t_rules->attr.namespace = NULL;
 
                unlang_ctx->rules = t_rules;
        }
@@ -4099,7 +4099,7 @@ static unlang_t *compile_subrequest(unlang_t *parent, unlang_compile_t *unlang_c
 
        fr_dict_t const                 *dict;
        fr_dict_attr_t const            *da = NULL;
-       fr_dict_enum_value_t const              *type_enum = NULL;
+       fr_dict_enum_value_t const      *type_enum = NULL;
 
        char const                      *packet_name = NULL;
        char                            *p, *namespace = NULL;