summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm34
1 files changed, 34 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index 2397f1a17d..82dcc1dbec 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -12,6 +12,7 @@ use Exporter;
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(choose_header is_intree DeclLong);
use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv);
@@ -44,6 +45,17 @@ sub new($)
bless($self, $class);
}
+sub ParseFunctionHasPipes($$)
+{
+ my ($self, $fn) = @_;
+
+ foreach my $e (@{$fn->{ELEMENTS}}) {
+ return 1 if ContainsPipe($e, $e->{LEVELS}[0]);
+ }
+
+ return 0;
+}
+
sub ParseFunction_r_State($$$$)
{
my ($self, $if, $fn, $name) = @_;
@@ -200,6 +212,17 @@ sub ParseFunction_r_Sync($$$$)
my ($self, $if, $fn, $name) = @_;
my $uname = uc $name;
+ if ($self->ParseFunctionHasPipes($fn)) {
+ $self->pidl_both("/*");
+ $self->pidl_both(" * The following function is skipped because");
+ $self->pidl_both(" * it uses pipes:");
+ $self->pidl_both(" *");
+ $self->pidl_both(" * dcerpc_$name\_r()");
+ $self->pidl_both(" */");
+ $self->pidl_both("");
+ return;
+ }
+
my $proto = "NTSTATUS dcerpc_$name\_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct $name *r)";
$self->fn_declare($proto);
@@ -622,6 +645,17 @@ sub ParseFunction_Sync($$$$)
{
my ($self, $if, $fn, $name) = @_;
+ if ($self->ParseFunctionHasPipes($fn)) {
+ $self->pidl_both("/*");
+ $self->pidl_both(" * The following function is skipped because");
+ $self->pidl_both(" * it uses pipes:");
+ $self->pidl_both(" *");
+ $self->pidl_both(" * dcerpc_$name()");
+ $self->pidl_both(" */");
+ $self->pidl_both("");
+ return;
+ }
+
my $uname = uc $name;
my $fn_args = "";
my $fn_str = "NTSTATUS dcerpc_$name";