pidl: Allow new property 'no_srv_register'.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 12 May 2010 21:53:07 +0000 (07:53 +1000)
committerGünther Deschner <gd@samba.org>
Tue, 18 May 2010 15:17:29 +0000 (17:17 +0200)
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 <gd@samba.org>
pidl/lib/Parse/Pidl/Compat.pm
pidl/lib/Parse/Pidl/NDR.pm
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm

index 66f3c5fffdbef4f6c3344f33b88d9aaf17bd8893..b8abcb8819568d1887e456d9a6a6da8ac683b463 100644 (file)
@@ -19,6 +19,7 @@ my %supported_properties = (
        "uuid"                  => ["INTERFACE"],
        "endpoint"              => ["INTERFACE"],
        "pointer_default"       => ["INTERFACE"],
+       "no_srv_register"       => ["INTERFACE"],
 
        # dcom
        "object"                => ["INTERFACE"],
index 3d91f3ad790a96593fb177f97be1a6df24d9d803..a875ec875613d2e17cb6a7878444ea2b5d0063f8 100644 (file)
@@ -882,7 +882,8 @@ my %property_list = (
        "helper"                => ["INTERFACE"],
        "pyhelper"              => ["INTERFACE"],
        "authservice"           => ["INTERFACE"],
-       "restricted"    => ["INTERFACE"],
+       "restricted"            => ["INTERFACE"],
+        "no_srv_register"       => ["INTERFACE"],
 
        # dcom
        "object"                => ["INTERFACE"],
index 23a8736efac25b528524f6e316ff13aa6fe24e96..f4dbe18bc1f1a758ae3054582b87c615ab5a8fb8 100644 (file)
@@ -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\__ */";
 }