]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
pass da_p
authorAlan T. DeKok <aland@freeradius.org>
Mon, 13 Jan 2025 20:49:13 +0000 (15:49 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 13 Jan 2025 20:49:13 +0000 (15:49 -0500)
src/lib/util/dict.h
src/lib/util/dict_tokenize.c

index ca9b408efe23fb42e91b812f6ee782d5e37ac966..6d6372bb407ff10181ea7abe4ccb8037f8479327 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_type_t *type, fr_dict_attr_flags_t *flags, char const *name);
+typedef bool (*fr_dict_attr_type_parse_t)(fr_dict_attr_t *da, char const *name);
 
 /*
  *     Forward declarations to avoid circular references.
index 430a0835311e9187bad0c101abc3471e79ca0fc4..c3cae3c290f3b16abc9dd1c5cd8ef2951a6d859d 100644 (file)
@@ -435,16 +435,18 @@ static int dict_process_type_field(dict_tokenize_ctx_t *dctx, char const *name,
         */
        type = fr_type_from_str(name);
        if (fr_type_is_null(type)) {
-               fr_dict_attr_t *da = *da_p;
-
                if (!dctx->dict->proto->attr.type_parse) {
                        fr_strerror_printf("Unknown data type '%s'", name);
                        return -1;
                }
 
-               if (!dctx->dict->proto->attr.type_parse(&type, &da->flags, name)) {
+               if (!dctx->dict->proto->attr.type_parse(da_p, name);
                        return -1;
                }
+
+               type = (*da_p)->type;
+
+               fr_assert(!fr_type_is_null(type));
        }
 
        return dict_attr_type_init(da_p, type);