From 0c6ce977ffb8f53f546596b76c1e0858cc6a88ba Mon Sep 17 00:00:00 2001 From: Julien Kerihuel Date: Sat, 31 May 2008 00:47:14 +0200 Subject: Fix if_version for interfaces with a if_version_minor field different from 0 Signed-off-by: Stefan Metzmacher (This used to be commit 7b6927832a1118b142d0d8a3a5548761f5a04f1a) --- source4/pidl/lib/Parse/Pidl/NDR.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 33e5ad3196..1e4504764a 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -688,7 +688,12 @@ sub ParseInterface($) $version = "0.0"; if(defined $idl->{PROPERTIES}->{version}) { - $version = $idl->{PROPERTIES}->{version}; + my @if_version = split(/\./, $idl->{PROPERTIES}->{version}); + if ($if_version[0] == $idl->{PROPERTIES}->{version}) { + $version = $idl->{PROPERTIES}->{version}; + } else { + $version = $if_version[1] << 16 | $if_version[0]; + } } # If no endpoint is set, default to the interface name as a named pipe -- cgit