summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-06 07:29:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:27 -0500
commit66af8726e525d6978936d5e950b0e4c3af66c86c (patch)
treed6d0df755ffff7d574eb73d314455e80f062527e /source4/librpc
parent939d37a0f2f1c5193bdbdd20d4fad387a79c5d99 (diff)
downloadsamba-66af8726e525d6978936d5e950b0e4c3af66c86c.tar.gz
samba-66af8726e525d6978936d5e950b0e4c3af66c86c.tar.bz2
samba-66af8726e525d6978936d5e950b0e4c3af66c86c.zip
r4557: support for [flags()] on typedef enum|bitmap
NDR_PAHEX is handled by ndr_print_enum() now metze (This used to be commit c3b2d2cca37193fead0df1a8808c3ffcd5180a89)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/ndr_basic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 8c9664771d..13ac087978 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -1002,7 +1002,11 @@ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type)
void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type,
const char *val, uint_t value)
{
- ndr->print(ndr, "%-25s: %s (%d)", name, val?val:"UNKNOWN_ENUM_VALUE", value);
+ if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) {
+ ndr->print(ndr, "%-25s: %s (0x%X)", name, val?val:"UNKNOWN_ENUM_VALUE", value);
+ } else {
+ ndr->print(ndr, "%-25s: %s (%d)", name, val?val:"UNKNOWN_ENUM_VALUE", value);
+ }
}
void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint_t flag, uint_t value)