From 771b57b3fcd0daeb3731f18e5b4ef95013150b82 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 25 Apr 2007 16:10:54 +0000 Subject: r22520: Fix the TYPE command. (This used to be commit b81b0d3308bf51c2e22d54024b3d6f1a59c6b283) --- source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm | 6 ++++++ source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 2 ++ 2 files changed, 8 insertions(+) (limited to 'source4/pidl/lib/Parse/Pidl/Wireshark') diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm index 44eb77f836..b53c56e741 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm @@ -124,6 +124,12 @@ sub handle_type($$$$$$$$$$) warning($pos, "invalid BASE_TYPE `$base_type'"); } + $dissectorname =~ s/^\"(.*)\"$/$1/g; + + if (not ($dissectorname =~ /;$/)) { + warning($pos, "missing semicolon"); + } + $data->{types}->{$name} = { NAME => $name, POS => $pos, diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 523fff9537..ea3f0db961 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -834,6 +834,8 @@ sub register_type($$$$$$$$) { my ($self, $type,$call,$ft,$base,$mask,$vals,$length) = @_; + return if (defined($self->{conformance}->{types}->{$type})); + $self->{conformance}->{types}->{$type} = { NAME => $type, DISSECTOR_NAME => $call, -- cgit