projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1ca41b
)
Print names for enumerated types
author
Alan T. DeKok
<aland@freeradius.org>
Tue, 14 May 2013 15:27:20 +0000
(11:27 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Tue, 14 May 2013 15:27:20 +0000
(11:27 -0400)
src/lib/print.c
patch
|
blob
|
history
diff --git
a/src/lib/print.c
b/src/lib/print.c
index
26a3bfb
..
6f399fc
100644
(file)
--- a/
src/lib/print.c
+++ b/
src/lib/print.c
@@
-444,7
+444,17
@@
char *vp_aprint(TALLOC_CTX *ctx, VALUE_PAIR const *vp)
case PW_TYPE_BYTE:
case PW_TYPE_SHORT:
case PW_TYPE_INTEGER:
- p = talloc_asprintf(ctx, "%u", vp->vp_integer);
+ {
+ DICT_VALUE *dv;
+
+ dv = dict_valbyattr(vp->da->attr, vp->da->vendor,
+ vp->vp_integer);
+ if (dv) {
+ p = talloc_strdup(ctx, dv->name);
+ } else {
+ p = talloc_asprintf(ctx, "%u", vp->vp_integer);
+ }
+ }
break;
case PW_TYPE_SIGNED: