svn commit: samba r10868 - in branches/SAMBA_4_0/source: librpc/ndr
pidl/lib/Parse/Pidl/Samba/NDR
metze at samba.org
metze at samba.org
Mon Oct 10 11:47:24 GMT 2005
Author: metze
Date: 2005-10-10 11:47:23 +0000 (Mon, 10 Oct 2005)
New Revision: 10868
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10868
Log:
make flag(NDR_PAHEX) possible to use and show the union level in hex
metze
Modified:
branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2005-10-10 11:21:02 UTC (rev 10867)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2005-10-10 11:47:23 UTC (rev 10868)
@@ -711,7 +711,11 @@
void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type)
{
- ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level);
+ if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) {
+ ndr->print(ndr, "%-25s: union %s(case 0x%X)", name, type, level);
+ } else {
+ ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level);
+ }
}
void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level)
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm 2005-10-10 11:21:02 UTC (rev 10867)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm 2005-10-10 11:47:23 UTC (rev 10868)
@@ -1624,15 +1624,17 @@
my ($e,$name) = @_;
my $have_default = 0;
- pidl "int level = ndr_print_get_switch_value(ndr, r);";
-
+ pidl "int level;";
foreach my $el (@{$e->{ELEMENTS}}) {
DeclareArrayVariables($el);
}
- pidl "ndr_print_union(ndr, name, level, \"$name\");";
start_flags($e);
+ pidl "level = ndr_print_get_switch_value(ndr, r);";
+
+ pidl "ndr_print_union(ndr, name, level, \"$name\");";
+
pidl "switch (level) {";
indent;
foreach my $el (@{$e->{ELEMENTS}}) {
More information about the samba-cvs
mailing list