pidl:Samba3/ServerNDR: skip DCERPC pipe elements and leave NULL pointers.
authorStefan Metzmacher <metze@samba.org>
Sat, 21 Sep 2013 21:46:01 +0000 (23:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 07:37:37 +0000 (08:37 +0100)
We don't support them anyway, but this lets us adding them to the idl
file and only ignore it on the server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm

index d433f60eb7dedaf032eb501b4117a2bf4114152f..e8d2bf9c5745ac81c7bb227cc380ffd3c89eb4ea 100644 (file)
@@ -14,7 +14,7 @@ use strict;
 use Parse::Pidl qw(warning error fatal);
 use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
 use Parse::Pidl::Util qw(ParseExpr has_property is_constant);
-use Parse::Pidl::NDR qw(GetNextLevel);
+use Parse::Pidl::NDR qw(GetNextLevel ContainsPipe);
 use Parse::Pidl::Samba4 qw(ElementStars DeclLong);
 use Parse::Pidl::Samba4::Header qw(GenerateFunctionOutEnv);
 
@@ -110,6 +110,7 @@ sub CallWithStruct($$$$)
        }
 
        foreach (@{$fn->{ELEMENTS}}) {
+               next if ContainsPipe($_, $_->{LEVELS}[0]);
                my @dir = @{$_->{DIRECTION}};
                if (grep(/in/, @dir) and grep(/out/, @dir)) {
                        # noop