svn commit: samba r19562 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark: .
jelmer at samba.org
jelmer at samba.org
Sun Nov 5 00:26:45 GMT 2006
Author: jelmer
Date: 2006-11-05 00:26:44 +0000 (Sun, 05 Nov 2006)
New Revision: 19562
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19562
Log:
Support returning simple scalars.
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm 2006-11-05 00:08:39 UTC (rev 19561)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm 2006-11-05 00:26:44 UTC (rev 19562)
@@ -438,6 +438,8 @@
} 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 @@
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}];
}
}
More information about the samba-cvs
mailing list