summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tdr/tdr.c10
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/TDR.pm6
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/tdr/tdr.c b/lib/tdr/tdr.c
index 293436ed5e..ce67003f8b 100644
--- a/lib/tdr/tdr.c
+++ b/lib/tdr/tdr.c
@@ -92,6 +92,11 @@ NTSTATUS tdr_pull_uint16(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v)
return NT_STATUS_OK;
}
+NTSTATUS tdr_pull_uint1632(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v)
+{
+ return tdr_pull_uint16(tdr, ctx, v);
+}
+
NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v)
{
TDR_PUSH_NEED_BYTES(tdr, 2);
@@ -100,6 +105,11 @@ NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v)
return NT_STATUS_OK;
}
+NTSTATUS tdr_push_uint1632(struct tdr_push *tdr, const uint16_t *v)
+{
+ return tdr_push_uint16(tdr, v);
+}
+
NTSTATUS tdr_print_uint16(struct tdr_print *tdr, const char *name, uint16_t *v)
{
tdr->print(tdr, "%-25s: 0x%02x (%u)", name, *v, *v);
diff --git a/pidl/lib/Parse/Pidl/Samba4/TDR.pm b/pidl/lib/Parse/Pidl/Samba4/TDR.pm
index a6b74a0ba4..c0749304ef 100644
--- a/pidl/lib/Parse/Pidl/Samba4/TDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/TDR.pm
@@ -7,6 +7,7 @@ package Parse::Pidl::Samba4::TDR;
use Parse::Pidl qw(fatal);
use Parse::Pidl::Util qw(has_property ParseExpr is_constant);
use Parse::Pidl::Samba4 qw(is_intree choose_header);
+use Parse::Pidl::Typelist qw(mapTypeName);
use Exporter;
@ISA = qw(Exporter);
@@ -195,15 +196,16 @@ sub ParserEnum($$$$)
{
my ($self,$e,$t,$p) = @_;
my $bt = Parse::Pidl::Typelist::enum_type_fn($e);
+ my $mt = mapTypeName($bt);
$self->fn_declare($p, "NTSTATUS tdr_$t\_$e->{NAME} (struct tdr_$t *tdr".typearg($t).", enum $e->{NAME} *v)");
$self->pidl("{");
if ($t eq "pull") {
- $self->pidl("\t$bt\_t r;");
+ $self->pidl("\t$mt r;");
$self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, mem_ctx, \&r));");
$self->pidl("\t*v = r;");
} elsif ($t eq "push") {
- $self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, ($bt\_t *)v));");
+ $self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, ($mt *)v));");
} elsif ($t eq "print") {
$self->pidl("\t/* FIXME */");
}