From: Nick Porter Date: Tue, 29 Dec 2020 12:12:41 +0000 (+0000) Subject: Remove unused xlat_fmt_copy_vp() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f010adb1d5dcfccec2a37dfcb87b74dbe4ed98e;p=thirdparty%2Ffreeradius-server.git Remove unused xlat_fmt_copy_vp() --- diff --git a/src/lib/unlang/xlat.h b/src/lib/unlang/xlat.h index d93d129a24c..243b3d78cd9 100644 --- a/src/lib/unlang/xlat.h +++ b/src/lib/unlang/xlat.h @@ -262,7 +262,6 @@ typedef size_t (*xlat_escape_legacy_t)(request_t *request, char *out, size_t out int xlat_fmt_get_vp(fr_pair_t **out, request_t *request, char const *name); -int xlat_fmt_copy_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, char const *name); int xlat_fmt_to_cursor(TALLOC_CTX *ctx, fr_cursor_t **out, bool *tainted, request_t *requst, char const *fmt); diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index b79cde3c5f1..7c048e05067 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -95,36 +95,6 @@ int xlat_fmt_get_vp(fr_pair_t **out, request_t *request, char const *name) } -/** Copy VP(s) from the specified request. - * - * @note DEPRECATED, TO NOT USE. @see xlat_fmt_to_cursor instead. - * - * @param ctx to alloc new fr_pair_ts in. - * @param out where to write the pointer to the copied VP. Will be NULL if the attribute couldn't be - * resolved. - * @param request current request. - * @param name attribute name including qualifiers. - * @return - * - -4 if either the attribute or qualifier were invalid. - * - The same error codes as #tmpl_find_vp for other error conditions. - */ -int xlat_fmt_copy_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, char const *name) -{ - int ret; - tmpl_t *vpt; - - *out = NULL; - - if (tmpl_afrom_attr_str(request, NULL, - &vpt, name, &(tmpl_rules_t){ .dict_def = request->dict }) <= 0) return -4; - - ret = tmpl_copy_pairs(ctx, out, request, vpt); - talloc_free(vpt); - - return ret; -} - - /** Convenience function to convert a string attribute reference to a cursor * * This is intended to be used by xlat functions which need to iterate over