summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-04 20:24:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:50 -0500
commit6031841dd8c605af09889ee3c3128224ef833c32 (patch)
tree96899bc8c8c490d9d97c49819d05e17492e7f47d /source4/pidl/lib/Parse/Pidl
parent78aa439426f7a01f4329277a28c09ebbcdc9aa9e (diff)
downloadsamba-6031841dd8c605af09889ee3c3128224ef833c32.tar.gz
samba-6031841dd8c605af09889ee3c3128224ef833c32.tar.bz2
samba-6031841dd8c605af09889ee3c3128224ef833c32.zip
r19557: Fix lookup table for WERROR.
Fix perl warnings when using NTSTATUS as return type. (This used to be commit 577cd1625d97efae7bb397570de81a6a5ac0b1b0)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 8793dd5774..e211a896ad 100644
--- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -462,7 +462,7 @@ sub Function($$$)
pidl_code "offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf\_$ifname\_status, &status);\n";
pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))";
pidl_code "\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Error: %s\", val_to_str(status, NT_errors, \"Unknown NT status 0x%08x\"));\n";
- $return_types{$ifname}->{"status"} = ["NTSTATUS", "Windows Error"];
+ $return_types{$ifname}->{"status"} = ["NTSTATUS", "NT Error"];
} elsif ($fn->{RETURN_TYPE} eq "WERROR") {
pidl_code "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf\_$ifname\_werror, &status);\n";
pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))";
@@ -770,6 +770,7 @@ sub ProcessInterface($)
foreach (keys %{$return_types{$x->{NAME}}}) {
my ($type, $desc) = @{$return_types{$x->{NAME}}->{$_}};
my $dt = find_type($type);
+ $dt or die("Unable to find information about return type `$type'");
register_hf_field("hf_$x->{NAME}_$_", $desc, "$x->{NAME}.$_", $dt->{FT_TYPE}, "BASE_HEX", $dt->{VALSSTRING}, 0, "");
$hf_used{"hf_$x->{NAME}_$_"} = 1;
}
@@ -839,6 +840,8 @@ sub Initialize($)
offset = dissect_ndr_nt_SID_with_options(tvb, offset, pinfo, tree, drep, param);
","FT_STRING", "BASE_DEC", 0, "NULL", 4);
register_type("WERROR",
+ "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_UINT32", "BASE_DEC", 0, "VALS(WERR_errors)", 4);
+ register_type("NTSTATUS",
"offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_UINT32", "BASE_DEC", 0, "VALS(NT_errors)", 4);
}