r12517: Don't generate empty init functions
authorJelmer Vernooij <jelmer@samba.org>
Tue, 27 Dec 2005 19:13:18 +0000 (19:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:51 +0000 (13:47 -0500)
source/librpc/config.mk
source/librpc/idl/nbt.idl
source/librpc/idl/winsrepl.idl
source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
source/scripting/ejs/config.mk

index 70159ecb201cd4ca1c28718995f0eebb31cc3941..5a43fbe0b107dfac72f7d731737c82a924eb4ca1 100644 (file)
@@ -34,7 +34,6 @@ NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_DCERPC]
-INIT_FUNCTION = dcerpc_dcerpc_init
 OBJ_FILES = gen_ndr/ndr_dcerpc.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
@@ -70,7 +69,6 @@ NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_MISC]
-INIT_FUNCTION = dcerpc_misc_init
 OBJ_FILES = gen_ndr/ndr_misc.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
@@ -229,7 +227,6 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_ORPC
 OBJ_FILES = ndr/ndr_orpc.o 
 
 [SUBSYSTEM::NDR_ORPC]
-INIT_FUNCTION = dcerpc_orpc_init
 OBJ_FILES = gen_ndr/ndr_orpc.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR NDR_ORPC_MANUAL
@@ -295,7 +292,6 @@ NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_KRB5PAC]
-INIT_FUNCTION = dcerpc_krb5pac_init
 OBJ_FILES = gen_ndr/ndr_krb5pac.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR NDR_KRB5PAC_UTIL
@@ -304,26 +300,22 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_KRB5PAC_UTIL
 OBJ_FILES = ndr/ndr_krb5pac.o
 
 [SUBSYSTEM::NDR_XATTR]
-INIT_FUNCTION = dcerpc_xattr_init
 OBJ_FILES = gen_ndr/ndr_xattr.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_SCHANNEL]
-INIT_FUNCTION = dcerpc_schannel_init
 OBJ_FILES = gen_ndr/ndr_schannel.o
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_NBT]
 OBJ_FILES = gen_ndr/ndr_nbt.o
-INIT_FUNCTION = dcerpc_nbt_init
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR NDR_MISC
 
 [SUBSYSTEM::NDR_WINSREPL]
 OBJ_FILES = gen_ndr/ndr_winsrepl.o
-INIT_FUNCTION = dcerpc_winsrepl_init
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR NDR_NBT
 
@@ -659,12 +651,3 @@ OBJ_FILES = gen_ndr/ndr_irpc_ejs.o
 SUBSYSTEM = SMBCALLS
 REQUIRED_SUBSYSTEMS = LIBRPC NDR_IRPC
 NOPROTO = YES
-
-################################################
-# Start SUBSYSTEM RPC_EJS
-[SUBSYSTEM::RPC_EJS]
-REQUIRED_SUBSYSTEMS = RPC_EJS_ECHO RPC_EJS_MISC RPC_EJS_SAMR RPC_EJS_SECURITY \
-       RPC_EJS_LSA RPC_EJS_SRVSVC RPC_EJS_SVCCTL RPC_EJS_IRPC RPC_EJS_WINREG \
-       RPC_EJS_INITSHUTDOWN
-# End SUBSYSTEM RPC_EJS
-################################################
index 96295100bbcbea831d5de96c99f1d827d86231fb..fe3bea49c4d478f6c0f728fbfe8307e337b10c0d 100644 (file)
@@ -8,9 +8,7 @@
    encoding if it doesn't work out
 */
 
-[ uuid("1-2-3-4"),
-  version(1.0),
-  depends(security)
+[ depends(security)
 ] interface nbt
 {
        const int NBT_NAME_SERVICE_PORT  = 137;
index 08b7fb72d8794bb5b4b3dedb1e6ab8902705ad9c..d16444e3466f827c1cccef84408fa4b67a7ea145 100644 (file)
@@ -10,8 +10,6 @@
 */
 
 [
-  uuid("0-1-2-3-4"),
-  version(0.0),
   pointer_default(unique),
   pointer_default_top(unique),
   depends(nbt)
index 2247fcbf81edb27e402279414edc4f736ed31a84..f294fa1b9bdebe5a3106851326c439f151213b44 100644 (file)
@@ -2158,13 +2158,10 @@ sub FunctionTable($)
        my $count = 0;
        my $uname = uc $interface->{NAME};
 
-       $count = $#{$interface->{FUNCTIONS}}+1;
-
-       return if ($count == 0);
+       return if ($#{$interface->{FUNCTIONS}}+1 == 0);
        return unless defined ($interface->{PROPERTIES}->{uuid});
 
        pidl "static const struct dcerpc_interface_call $interface->{NAME}\_calls[] = {";
-       $count = 0;
        foreach my $d (@{$interface->{FUNCTIONS}}) {
                next if not defined($d->{OPNUM});
                pidl "\t{";
@@ -2343,26 +2340,26 @@ sub RegistrationFunction($$)
 {
        my ($idl,$basename) = @_;
 
-       pidl "NTSTATUS dcerpc_$basename\_init(void)";
-       pidl "{";
-       indent;
-       pidl "NTSTATUS status = NT_STATUS_OK;";
+       my $body = "";
+
        foreach my $interface (@{$idl}) {
                next if $interface->{TYPE} ne "INTERFACE";
-
-               my $count = ($#{$interface->{FUNCTIONS}}+1);
-
-               next if ($count == 0);
+               next if ($#{$interface->{FUNCTIONS}}+1 == 0);
                next unless defined ($interface->{PROPERTIES}->{uuid});
 
-               pidl "status = dcerpc_ndr_$interface->{NAME}_init();";
-               pidl "if (NT_STATUS_IS_ERR(status)) {";
-               pidl "\treturn status;";
-               pidl "}";
-               pidl "";
+               $body .= "\tstatus = dcerpc_ndr_$interface->{NAME}_init();\n";
+               $body .= "\tif (NT_STATUS_IS_ERR(status)) {\n";
+               $body .= "\t\treturn status;\n";
+               $body .= "\t}\n";
+               $body .= "\n";
        }
-       pidl "return status;";
-       deindent;
+
+       return unless $body;
+
+       pidl "NTSTATUS dcerpc_$basename\_init(void)";
+       pidl "{";
+       pidl "\tNTSTATUS status = NT_STATUS_OK;";
+       pidl "$body\treturn status;";
        pidl "}";
        pidl "";
 }
index 93b053c0d18e71e48bb8b0494c6d2c5e0987bf90..902fed2fd7167470a4b183265084fad72bbd7613 100644 (file)
@@ -3,7 +3,6 @@
 [SUBSYSTEM::EJSRPC]
 OBJ_FILES = \
                ejsrpc.o
-REQUIRED_SUBSYSTEMS = RPC_EJS
 NOPROTO = YES
 # End SUBSYSTEM EJSRPC
 #######################
@@ -30,7 +29,8 @@ OBJ_FILES = \
                smbcalls_param.o \
                ejsnet.o \
                mprutil.o
-REQUIRED_SUBSYSTEMS = AUTH EJS LIBBASIC EJSRPC MESSAGING LIBSAMBA3 LIBNET NDR_ALL
+REQUIRED_SUBSYSTEMS = AUTH EJS LIBBASIC EJSRPC MESSAGING LIBSAMBA3 LIBNET \
+                                         NDR_ALL
 # End SUBSYSTEM SMBCALLS
 #######################