Make some fatal errors non-fatal. This means we generate invalid code in
[kai/samba.git] / pidl / lib / Parse / Pidl / Samba3 / ClientNDR.pm
index 4109ce996211ad51881ebbcab302fff32a0461ec..9a7a037b5444c6329d720db8326ff76844982a9d 100644 (file)
@@ -12,7 +12,7 @@ use Exporter;
 @EXPORT_OK = qw(ParseFunction $res $res_hdr ParseOutputArgument);
 
 use strict;
-use Parse::Pidl qw(fatal warning);
+use Parse::Pidl qw(fatal warning error);
 use Parse::Pidl::Util qw(has_property ParseExpr);
 use Parse::Pidl::Samba4 qw(DeclLong);
 use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv);
@@ -76,7 +76,11 @@ sub ParseOutputArgument($$$)
        my ($self, $fn, $e) = @_;
        my $level = 0;
 
-       fatal($e->{ORIGINAL}, "[out] argument is not a pointer or array") if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and $e->{LEVELS}[0]->{TYPE} ne "ARRAY");
+       if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and $e->{LEVELS}[0]->{TYPE} ne "ARRAY") {
+               $self->pidl("return NT_STATUS_NOT_SUPPORTED;");
+               error($e->{ORIGINAL}, "[out] argument is not a pointer or array");
+               return;
+       }
 
        if ($e->{LEVELS}[0]->{TYPE} eq "POINTER") {
                $level = 1;