summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Kerihuel <j.kerihuel@openchange.org>2008-05-31 00:47:14 +0200
committerStefan Metzmacher <metze@samba.org>2008-06-27 12:43:04 +0200
commit7b6927832a1118b142d0d8a3a5548761f5a04f1a (patch)
tree648ff08a303fa8e14b63de8617aba84dd500046a
parentba6394cb654f2a6683b5e97fad8e838d8e457e06 (diff)
downloadsamba-7b6927832a1118b142d0d8a3a5548761f5a04f1a.tar.gz
Fix if_version for interfaces with a if_version_minor field different from 0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source/pidl/lib/Parse/Pidl/NDR.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/pidl/lib/Parse/Pidl/NDR.pm b/source/pidl/lib/Parse/Pidl/NDR.pm
index 33e5ad31961..1e4504764aa 100644
--- a/source/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source/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