From c5069ba7e3dbabd586a3a313d6c2d287b0a46e2f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Oct 2005 20:53:55 +0000 Subject: r10788: - Give unions a name - Check initialisation function return value (This used to be commit ebb8e75ebd572d62bdb3615d41c210bcc918fa41) --- source4/pidl/lib/Parse/Pidl/Samba3/Client.pm | 3 ++- source4/pidl/lib/Parse/Pidl/Samba3/Header.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/pidl/lib/Parse') 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"); -- cgit