r12623: Another round of fixes for the prototypes of tables.c
[samba.git] / source4 / librpc / tables.pl
index 462ef19e0823f65dd6bcebba7eca85572a5c2755..9f30674de8b0b5a2602f4117c1d8632ed4e328d2 100644 (file)
@@ -55,7 +55,8 @@ sub process_file($)
        while (my $line = <FILE>) {
                if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
                        $found = 1;
-                       $init_fns.="\tlibrpc_register_interface(&$1);\n";
+                       $init_fns.="\tstatus = librpc_register_interface(&$1);\n";
+                       $init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
                }
        }
 
@@ -81,12 +82,9 @@ process_file($_) foreach (@ARGV);
 
 print TABLEC <<EOF;
 
-NTSTATUS dcerpc_table_init(void)
+NTSTATUS dcerpc_register_builtin_interfaces(void)
 {
-       static BOOL initialized = False;
-
-       if (initialized) return NT_STATUS_OK;
-       initialized = True;
+       NTSTATUS status;
 
 $init_fns