From 73fae2b007cdb0a6bfe5740a0d119bbde52dd1ce Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Nov 2010 11:07:12 +1100 Subject: 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. --- source4/param/loadparm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4') 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; } -- cgit