]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we can't set da->type until later, or else things complain
authorAlan T. DeKok <aland@freeradius.org>
Mon, 13 Jan 2025 21:21:52 +0000 (16:21 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 13 Jan 2025 21:28:23 +0000 (16:28 -0500)
src/lib/util/dict.h
src/lib/util/dict_tokenize.c

index 193a05ea2beec01e15785136768e4e81ff19653f..649383de7914cdc32d310fe24fc4454bac745895 100644 (file)
@@ -304,7 +304,7 @@ typedef enum {
 } fr_dict_attr_err_t;
 
 typedef bool (*fr_dict_attr_valid_func_t)(fr_dict_attr_t *da);
-typedef bool (*fr_dict_attr_type_parse_t)(fr_dict_attr_t **da_p, char const *name);
+typedef bool (*fr_dict_attr_type_parse_t)(fr_type_t *type, fr_dict_attr_t **da_p, char const *name);
 
 /*
  *     Forward declarations to avoid circular references.
index c9d3874374655282c65194bdab84cdc663e2aed3..88e49c2cc1d963a8a80f55f226964e15cc40eec6 100644 (file)
@@ -440,12 +440,10 @@ static int dict_process_type_field(dict_tokenize_ctx_t *dctx, char const *name,
                        return -1;
                }
 
-               if (!dctx->dict->proto->attr.type_parse(da_p, name)) {
+               if (!dctx->dict->proto->attr.type_parse(&type, da_p, name)) {
                        return -1;
                }
 
-               type = (*da_p)->type;
-
                fr_assert(!fr_type_is_null(type));
        }