Print xlat types, too. Fixes #1574
authorAlan T. DeKok <aland@freeradius.org>
Fri, 1 Apr 2016 15:42:31 +0000 (11:42 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 1 Apr 2016 15:42:31 +0000 (11:42 -0400)
src/lib/print.c

index 0d11ef7..5ce0928 100644 (file)
@@ -436,6 +436,10 @@ 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);
 }