From 51c612e4de9e52bf1967172728bb2dc7b63f9cd7 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 6 Oct 2013 01:31:35 -0700 Subject: Remove check_col from generated DCE/RPC dissectors. This is a backport of http://anonsvn.wireshark.org/viewvc?view=revision&revision=52313 Bug 8804 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8804). Signed-off-by: Matthieu Patou Reviewed-by: Andrew Bartlett Autobuild-User(master): Matthieu Patou Autobuild-Date(master): Mon Oct 7 08:09:51 CEST 2013 on sn-devel-104 --- pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 9c49931079..1151dc0807 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -534,12 +534,12 @@ sub Function($$$) if (not defined($fn->{RETURN_TYPE})) { } elsif ($fn->{RETURN_TYPE} eq "NTSTATUS") { $self->pidl_code("offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf\_$ifname\_status, &status);\n"); - $self->pidl_code("if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"); + $self->pidl_code("if (status != 0)"); $self->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", "NT Error"]; } elsif ($fn->{RETURN_TYPE} eq "WERROR") { $self->pidl_code("offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf\_$ifname\_werror, &status);\n"); - $self->pidl_code("if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"); + $self->pidl_code("if (status != 0)"); $self->pidl_code("\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Error: %s\", val_to_str(status, WERR_errors, \"Unknown DOS error 0x%08x\"));\n"); $return_types{$ifname}->{"werror"} = ["WERROR", "Windows Error"]; @@ -549,12 +549,12 @@ sub Function($$$) my $return_dissect = "dissect_ndr_" .Parse::Pidl::Typelist::enum_type_fn($type->{DATA}); $self->pidl_code("offset = $return_dissect(tvb, offset, pinfo, tree, drep, hf\_$ifname\_$fn->{RETURN_TYPE}_status, &status);"); - $self->pidl_code("if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"); + $self->pidl_code("if (status != 0)"); $self->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") { $self->pidl_code("offset = dissect_ndr_$fn->{RETURN_TYPE}(tvb, offset, pinfo, tree, drep, hf\_$ifname\_$fn->{RETURN_TYPE}_status, &status);"); - $self->pidl_code("if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"); + $self->pidl_code("if (status != 0)"); $self->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}]; } -- cgit