From f5f184a77cfe83498d6e55f10fdf79ca37229696 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 13 May 2010 07:53:07 +1000 Subject: pidl: Allow new property 'no_srv_register'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Samba-only property prevents pild from emitting the rpc_wbint_init function, which causes problems because it needs rpc_srv_register(). Andrew Bartlett Signed-off-by: Günther Deschner --- pidl/lib/Parse/Pidl/Compat.pm | 1 + pidl/lib/Parse/Pidl/NDR.pm | 3 ++- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 13 +++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'pidl/lib/Parse') diff --git a/pidl/lib/Parse/Pidl/Compat.pm b/pidl/lib/Parse/Pidl/Compat.pm index 66f3c5fffd..b8abcb8819 100644 --- a/pidl/lib/Parse/Pidl/Compat.pm +++ b/pidl/lib/Parse/Pidl/Compat.pm @@ -19,6 +19,7 @@ my %supported_properties = ( "uuid" => ["INTERFACE"], "endpoint" => ["INTERFACE"], "pointer_default" => ["INTERFACE"], + "no_srv_register" => ["INTERFACE"], # dcom "object" => ["INTERFACE"], diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm index 3d91f3ad79..a875ec8756 100644 --- a/pidl/lib/Parse/Pidl/NDR.pm +++ b/pidl/lib/Parse/Pidl/NDR.pm @@ -882,7 +882,8 @@ my %property_list = ( "helper" => ["INTERFACE"], "pyhelper" => ["INTERFACE"], "authservice" => ["INTERFACE"], - "restricted" => ["INTERFACE"], + "restricted" => ["INTERFACE"], + "no_srv_register" => ["INTERFACE"], # dcom "object" => ["INTERFACE"], diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 23a8736efa..f4dbe18bc1 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -313,12 +313,13 @@ sub ParseInterface($) ParseDispatchFunction($if); - pidl_hdr "NTSTATUS rpc_$if->{NAME}_init(void);"; - pidl "NTSTATUS rpc_$if->{NAME}_init(void)"; - pidl "{"; - pidl "\treturn rpc_srv_register(SMB_RPC_INTERFACE_VERSION, \"$if->{NAME}\", \"$if->{NAME}\", \&ndr_table_$if->{NAME}, api_$if->{NAME}_cmds, sizeof(api_$if->{NAME}_cmds) / sizeof(struct api_struct));"; - pidl "}"; - + if (not has_property($if, "no_srv_register")) { + pidl_hdr "NTSTATUS rpc_$if->{NAME}_init(void);"; + pidl "NTSTATUS rpc_$if->{NAME}_init(void)"; + pidl "{"; + pidl "\treturn rpc_srv_register(SMB_RPC_INTERFACE_VERSION, \"$if->{NAME}\", \"$if->{NAME}\", \&ndr_table_$if->{NAME}, api_$if->{NAME}_cmds, sizeof(api_$if->{NAME}_cmds) / sizeof(struct api_struct));"; + pidl "}"; + } pidl_hdr "#endif /* __SRV_$uif\__ */"; } -- cgit