summaryrefslogtreecommitdiff
path: root/source4/pidl/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-10-06 20:53:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:29 -0500
commitc5069ba7e3dbabd586a3a313d6c2d287b0a46e2f (patch)
treed1a48f3d8896a983270ec993b658b5896c595a3b /source4/pidl/lib
parent0ef04670398f27d36bf9dabf39a925a2ba2b29d0 (diff)
downloadsamba-c5069ba7e3dbabd586a3a313d6c2d287b0a46e2f.tar.gz
samba-c5069ba7e3dbabd586a3a313d6c2d287b0a46e2f.tar.bz2
samba-c5069ba7e3dbabd586a3a313d6c2d287b0a46e2f.zip
r10788: - Give unions a name
- Check initialisation function return value (This used to be commit ebb8e75ebd572d62bdb3615d41c210bcc918fa41)
Diffstat (limited to 'source4/pidl/lib')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/Client.pm3
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/Header.pm2
2 files changed, 3 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/Client.pm b/source4/pidl/lib/Parse/Pidl/Samba3/Client.pm
index 164f53d06b..ee1ab09324 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/Client.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/Client.pm
@@ -71,7 +71,8 @@ sub ParseFunction($$)
pidl "";
pidl "/* Marshall data and send request */";
pidl "";
- pidl "init_$if->{NAME}_q_$fn->{NAME}(&q$inargs);";
+ pidl "if (!init_$if->{NAME}_q_$fn->{NAME}(&q$inargs))";
+ pidl "\treturn NT_STATUS_INVALID_PARAMETER;";
pidl "";
pidl "CLI_DO_RPC(cli, mem_ctx, PI_$uif, $ufn,";
pidl "\tq, r,";
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba3/Header.pm
index 1bcaa5c672..78bd8fe339 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/Header.pm
@@ -130,7 +130,7 @@ sub ParseUnion($$$)
pidl "typedef struct $if->{NAME}_$n\_ctr {";
indent;
pidl "uint32 $_;" foreach (keys %$extra);
- pidl "union {";
+ pidl "union $if->{NAME}_$n {";
indent;
foreach (@{$u->{ELEMENTS}}) {
next if ($_->{TYPE} eq "EMPTY");