diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-11-06 13:53:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:50 -0500 |
commit | df5b70db2c228bd781d8472440858dcdf502f9f9 (patch) | |
tree | 0e71ec1b5f2ab6b35b1d3f8175ded87613a38a69 /source4/pidl/lib/Parse | |
parent | 72c28b3c1e522773fd160c1f977e464a05016035 (diff) | |
download | samba-df5b70db2c228bd781d8472440858dcdf502f9f9.tar.gz samba-df5b70db2c228bd781d8472440858dcdf502f9f9.tar.bz2 samba-df5b70db2c228bd781d8472440858dcdf502f9f9.zip |
r11535: Support void functions when generating templates.
(This used to be commit e8926a4e171a7bf74c220fa825ef5fa9e297fa47)
Diffstat (limited to 'source4/pidl/lib/Parse')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba/Template.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba/Template.pm b/source4/pidl/lib/Parse/Pidl/Samba/Template.pm index fea4b47dee..1960c89154 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba/Template.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba/Template.pm @@ -46,6 +46,7 @@ sub Template($) #include \"includes.h\" #include \"rpc_server/dcerpc_server.h\" #include \"librpc/gen_ndr/ndr_$name.h\" +#include \"rpc_server/common/common.h\" "; @@ -59,8 +60,15 @@ sub Template($) */ static $d->{RETURN_TYPE} $fname(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct $fname *r) -{ - DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); +{"; + + if ($d->{RETURN_TYPE} eq "void") { + $res .= "DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);\n"; + } else { + $res .= "DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);\n"; + } + + $res .= " } "; |