summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-17 11:07:12 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-17 11:30:07 +1100
commit73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce (patch)
tree809229ec33bef66f292495276576428311863b9e
parentf401930546dc719a9abd5a4b28315388a247dfc6 (diff)
downloadsamba-73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce.tar.gz
samba-73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce.tar.bz2
samba-73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce.zip
s4-loadparm: set debuglevel and logfile in tables
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.
-rw-r--r--source4/param/loadparm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index e7caf66004..f60e4ebd1a 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -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;
}