pidl: for wireshark use only the major of the version
authorMatthieu Patou <mat@matws.net>
Fri, 5 Aug 2011 19:14:03 +0000 (23:14 +0400)
committerMatthieu Patou <mat@matws.net>
Fri, 5 Aug 2011 21:33:08 +0000 (01:33 +0400)
pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index 45b6c1e..46c9850 100644 (file)
@@ -905,16 +905,15 @@ sub ProcessInterface($$)
            . ", 0x" . substr($if_uuid, 35, 2) . " }");
            $self->pidl_def("};");
        
-           my $maj = $x->{VERSION};
+           my $maj = 0x0000FFFF & $x->{VERSION};
            $maj =~ s/\.(.*)$//g;
-           $self->pidl_def("static guint32 ver_dcerpc_$x->{NAME} = $maj;");
+           $self->pidl_def("static guint16 ver_dcerpc_$x->{NAME} = $maj;");
            $self->pidl_def("");
        }
 
        $return_types{$x->{NAME}} = {};
 
        $self->Interface($x);
-
        $self->pidl_code("\n".DumpFunctionTable($x));
 
        foreach (keys %{$return_types{$x->{NAME}}}) {