s3:param Clarify parameter name on init_globals()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 20 Aug 2010 07:51:48 +0000 (17:51 +1000)
committerMichael Adam <obnox@samba.org>
Sun, 22 Aug 2010 20:54:59 +0000 (22:54 +0200)
This parameter is used with the registry backend to
cause the globals table to be re-initialised.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
source3/param/loadparm.c

index 340031b45f5da6c12b9241c856e37b988409aba2..225f6c927b71007cf8a2cb9f0f09360fa8955b87 100644 (file)
@@ -4947,14 +4947,14 @@ static void free_global_parameters(void)
  Initialise the global parameter structure.
 ***************************************************************************/
 
-static void init_globals(bool first_time_only)
+static void init_globals(bool reinit_globals)
 {
        static bool done_init = False;
        char *s = NULL;
        int i;
 
         /* If requested to initialize only once and we've already done it... */
-        if (first_time_only && done_init) {
+        if (!reinit_globals && done_init) {
                 /* ... then we have nothing more to do */
                 return;
         }
@@ -9181,7 +9181,7 @@ static bool lp_load_ex(const char *pszFname,
        bGlobalOnly = global_only;
        bAllowIncludeRegistry = allow_include_registry;
 
-       init_globals(initialize_globals);
+       init_globals(initialize_globals);
        debug_init();
 
        free_file_list();
@@ -9229,7 +9229,7 @@ static bool lp_load_ex(const char *pszFname,
                        /* start over */
                        DEBUG(1, ("lp_load_ex: changing to config backend "
                                  "registry\n"));
-                       init_globals(false);
+                       init_globals(true);
                        lp_kill_all_services();
                        return lp_load_ex(pszFname, global_only, save_defaults,
                                          add_ipc, initialize_globals,