pidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements
[samba.git] / pidl / lib / Parse / Pidl / Samba3 / ClientNDR.pm
index 67051a8783de4524b3c769f8090f749f47fc04c5..8142b3569991ca84403e0605cfdcbc7dca6f8b0c 100644 (file)
@@ -14,6 +14,7 @@ use Exporter;
 use strict;
 use Parse::Pidl qw(fatal warning error);
 use Parse::Pidl::Util qw(has_property ParseExpr);
+use Parse::Pidl::NDR qw(ContainsPipe);
 use Parse::Pidl::Typelist qw(mapTypeName);
 use Parse::Pidl::Samba4 qw(DeclLong);
 use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv);
@@ -378,6 +379,16 @@ sub ParseInterface($$)
        foreach my $fn (@{$if->{FUNCTIONS}}) {
                next if has_property($fn, "noopnum");
                next if has_property($fn, "todo");
+
+               my $skip = 0;
+               foreach my $e (@{$fn->{ELEMENTS}}) {
+                       if (ContainsPipe($e, $e->{LEVELS}[0])) {
+                               $skip = 1;
+                               last;
+                       }
+               }
+               next if $skip;
+
                $self->ParseFunction($if->{NAME}, $fn);
        }
        $self->pidl_hdr("#endif /* __CLI_$uif\__ */");