s4-loadparm: set debuglevel and logfile in tables
authorAndrew Tridgell <tridge@samba.org>
Wed, 17 Nov 2010 00:07:12 +0000 (11:07 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 17 Nov 2010 00:30:07 +0000 (11:30 +1100)
this allows the debug level and logfile to be queried from python
using lp.get(). Otheriwse they are set only in the globals, and not in
the tables.

source4/param/loadparm.c

index e7caf66004bff9de5f2d22156e033a42f2cfb2ab..f60e4ebd1aea918ee55d5a7e374806f9ab899018 100644 (file)
@@ -1527,6 +1527,10 @@ static bool handle_debuglevel(struct loadparm_context *lp_ctx,
 {
        DEBUGLEVEL = atoi(pszParmValue);
 
+       /* also set in the loadparm table, so querying debug level
+          works */
+       *(int *)ptr = DEBUGLEVEL;
+
        return true;
 }
 
@@ -1537,6 +1541,7 @@ static bool handle_logfile(struct loadparm_context *lp_ctx,
                free(discard_const_p(char, logfile));
        }
        logfile = strdup(pszParmValue);
+       string_set(lp_ctx, ptr, pszParmValue);
        return true;
 }