summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-05 00:26:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:52 -0500
commita7b18e70dd315efc15045d32c0c2bfdb76cf4805 (patch)
tree8651d9c9dae2f7a7777c8c77f39c6ca87221eed6 /source4
parentbdf1f0b0db569f65c1501df67788c4f9b7a66966 (diff)
downloadsamba-a7b18e70dd315efc15045d32c0c2bfdb76cf4805.tar.gz
samba-a7b18e70dd315efc15045d32c0c2bfdb76cf4805.tar.bz2
samba-a7b18e70dd315efc15045d32c0c2bfdb76cf4805.zip
r19562: Support returning simple scalars.
(This used to be commit 8bd12d3fdb23a532bf6b46bc88a21837303a0374)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index c5a39a4c42..8c75d590e0 100644
--- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -438,6 +438,8 @@ sub Function($$$)
} elsif (my $type = getType($fn->{RETURN_TYPE})) {
if ($type->{DATA}->{TYPE} eq "ENUM") {
pidl_code "g".Parse::Pidl::Typelist::enum_type_fn($type->{DATA}) . " status;\n";
+ } elsif ($type->{DATA}->{TYPE} eq "SCALAR") {
+ pidl_code "g$fn->{RETURN_TYPE} status;\n";
} else {
print "$fn->{FILE}:$fn->{LINE}: error: return type `$fn->{RETURN_TYPE}' not yet supported\n";
}
@@ -474,6 +476,11 @@ sub Function($$$)
pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))";
pidl_code "\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Status: %s\", val_to_str(status, $ifname\_$fn->{RETURN_TYPE}\_vals, \"Unknown " . $fn->{RETURN_TYPE} . " error 0x%08x\"));\n";
$return_types{$ifname}->{$fn->{RETURN_TYPE}."_status"} = [$fn->{RETURN_TYPE}, $fn->{RETURN_TYPE}];
+ } elsif ($type->{DATA}->{TYPE} eq "SCALAR") {
+ pidl_code "offset = dissect_ndr_$fn->{RETURN_TYPE}(tvb, offset, pinfo, tree, drep, hf\_$ifname\_$fn->{RETURN_TYPE}_status, &status);";
+ pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))";
+ pidl_code "\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Status: %d\", status);\n";
+ $return_types{$ifname}->{$fn->{RETURN_TYPE}."_status"} = [$fn->{RETURN_TYPE}, $fn->{RETURN_TYPE}];
}
}