pidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Oct 2010 05:53:48 +0000 (07:53 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 Mar 2011 13:31:17 +0000 (14:31 +0100)
metze

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 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);
 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");
        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\__ */");
                $self->ParseFunction($if->{NAME}, $fn);
        }
        $self->pidl_hdr("#endif /* __CLI_$uif\__ */");