From df5b70db2c228bd781d8472440858dcdf502f9f9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 6 Nov 2005 13:53:37 +0000 Subject: r11535: Support void functions when generating templates. (This used to be commit e8926a4e171a7bf74c220fa825ef5fa9e297fa47) --- source4/pidl/lib/Parse/Pidl/Samba/Template.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source4/pidl/lib/Parse') 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 .= " } "; -- cgit