]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove unused xlat_fmt_copy_vp()
authorNick Porter <nick@portercomputing.co.uk>
Tue, 29 Dec 2020 12:12:41 +0000 (12:12 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 23:05:49 +0000 (23:05 +0000)
src/lib/unlang/xlat.h
src/lib/unlang/xlat_builtin.c

index d93d129a24c7830faaa08d356ce6c7e9075abbd7..243b3d78cd992a73e1608128bffc2c13e9d74b7e 100644 (file)
@@ -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);
index b79cde3c5f1e095e12167de3611ca59965407a14..7c048e0506786b1d7003816a5c9bb9e73b052242 100644 (file)
@@ -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