fr_dict_attr_t *da; //!< FR_TYPE_VSA to fix
} dict_fixup_vsa_t;
-
/** Dictionary attribute namespaces need their hash tables finalised
*
*/
* @param[in] line this fixup relates to.
* @param[in] parent for the cloned attribute.
* @param[in] da The group dictionary attribute.
- * @param[in] ref OID string representing what the group references.
- * @param[in] ref_len Length of the reference string.
+ * @param[in] ref OID string representing what the group references..
* @return
* - 0 on success.
* - -1 on out of memory.
*/
int dict_fixup_clone(dict_fixup_ctx_t *fctx, char const *filename, int line,
fr_dict_attr_t *parent, fr_dict_attr_t *da,
- char const *ref, size_t ref_len)
+ char const *ref)
{
dict_fixup_clone_t *fixup;
*fixup = (dict_fixup_clone_t) {
.parent = parent,
.da = da,
- .ref = talloc_bstrndup(fixup, ref, ref_len)
+ .ref = talloc_typed_strdup(fixup, ref)
};
return dict_fixup_common(filename, line, &fctx->clone, &fixup->common);
int dict_fixup_clone(dict_fixup_ctx_t *fctx, char const *filename, int line,
fr_dict_attr_t *parent, fr_dict_attr_t *da,
- char const *ref, size_t ref_len);
+ char const *ref);
int dict_fixup_vsa(dict_fixup_ctx_t *fctx, char const *filename, int line,
fr_dict_attr_t *da);
if (dict_fixup_clone(&ctx->fixup, CURRENT_FRAME(ctx)->filename, CURRENT_FRAME(ctx)->line,
fr_dict_attr_unconst(parent), fr_dict_attr_unconst(da),
- ref, talloc_array_length(ref) - 1) < 0) {
+ ref) < 0) {
fail:
talloc_free(ref);
return -1;
ret = dict_fixup_clone(&ctx->fixup, CURRENT_FRAME(ctx)->filename, CURRENT_FRAME(ctx)->line,
fr_dict_attr_unconst(CURRENT_FRAME(ctx)->da),
dict_attr_child_by_num(CURRENT_FRAME(ctx)->da, CURRENT_FRAME(ctx)->member_num),
- ref, talloc_array_length(ref) - 1);
+ ref);
talloc_free(ref);
if (ret < 0) return -1;