From ed111d11ebcbaa1e709485f86ca45e582a55301f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Oct 2010 21:10:31 +1100 Subject: s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt calls The problem here is that we cannot run lp_set_cmdline() (directly or indirectly via the popt helpers) until load_case_tables() has been run. However, load_case_tables does not have auto-initialisation, so we must init it once, and once only. Andrew Bartlett --- source3/web/swat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/web') diff --git a/source3/web/swat.c b/source3/web/swat.c index 531cf3f411..bb3f3f974c 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -1420,6 +1420,8 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid) open("/dev/null", O_WRONLY); setup_logging("swat", DEBUG_FILE); + load_case_tables(); + pc = poptGetContext("swat", argc, (const char **) argv, long_options, 0); /* Parse command line options */ @@ -1428,8 +1430,6 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid) poptFreeContext(pc); - load_case_tables(); - /* This should set a more apporiate log file */ load_config(True); reopen_logs(); -- cgit