/** Print one attribute value to a string * * @param ctx to allocate string in. * @param vp to print. * @param[in] quote the quotation character * @return a talloced buffer with the attribute operator and value. */ char *vp_aprints_value(TALLOC_CTX *ctx, VALUE_PAIR const *vp, char quote) { VERIFY_VP(vp); if (vp->type == VT_XLAT) { return fr_aprints(ctx, vp->value.xlat, talloc_array_length(vp->value.xlat) - 1, quote); } return value_data_aprints(ctx, vp->da->type, vp->da, &vp->data, vp->vp_length, quote); }
/** Print one attribute value to a string * * @param ctx to allocate string in. * @param vp to print. * @param[in] quote the quotation character * @return a talloced buffer with the attribute operator and value. */ char *vp_aprints_value(TALLOC_CTX *ctx, VALUE_PAIR const *vp, char quote) { VERIFY_VP(vp); return value_data_aprints(ctx, vp->da->type, vp->da, &vp->data, quote); }