summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-16 18:02:14 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-16 18:02:14 +0100
commit9692c71aa1552a6415bec185706aa7afdf16c288 (patch)
tree75a0722633c47b594885227203a41eca0894d581 /pidl/lib/Parse/Pidl/Samba3
parent327218f1cfa604058e3a11a64d72b930efc126d2 (diff)
downloadsamba-9692c71aa1552a6415bec185706aa7afdf16c288.tar.gz
samba-9692c71aa1552a6415bec185706aa7afdf16c288.tar.bz2
samba-9692c71aa1552a6415bec185706aa7afdf16c288.zip
Make some fatal errors non-fatal. This means we generate invalid code in
some cases, but we do print errors. We don't use all generated code yet at the moment, so this isn't much of a problem.
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba3')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 4109ce9962..9a7a037b54 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -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;