From a39d56933660e72742d9b438ae9c6b4c513c1449 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Mon, 17 Feb 2014 16:38:59 +1300 Subject: [PATCH] param: attempt to consolidate handle_logfile between the two loadparms Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Reviewed-on: https://gerrit.samba.org/104 Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison --- lib/param/loadparm.c | 13 +++++++------ source3/param/loadparm.c | 6 ------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index b47a2c04866..5a6b361d9e5 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -102,8 +102,6 @@ static bool handle_realm(struct loadparm_context *lp_ctx, int unused, const char *pszParmValue, char **ptr); static bool handle_copy(struct loadparm_context *lp_ctx, int unused, const char *pszParmValue, char **ptr); -static bool handle_logfile(struct loadparm_context *lp_ctx, int unused, - const char *pszParmValue, char **ptr); #include "lib/param/param_table.c" @@ -1146,13 +1144,16 @@ bool handle_debug_list(struct loadparm_context *lp_ctx, int unused, return debug_parse_levels(pszParmValue); } -static bool handle_logfile(struct loadparm_context *lp_ctx, int unused, - const char *pszParmValue, char **ptr) +bool handle_logfile(struct loadparm_context *lp_ctx, int unused, + const char *pszParmValue, char **ptr) { - debug_set_logfile(pszParmValue); - if (lp_ctx->global) { + if (lp_ctx->s3_fns != NULL) { + lp_ctx->s3_fns->lp_string_set(ptr, pszParmValue); + } else { + debug_set_logfile(pszParmValue); lpcfg_string_set(lp_ctx, ptr, pszParmValue); } + return true; } diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index adf3001933b..bbb2144cf60 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -272,12 +272,6 @@ static bool handle_dos_charset(struct loadparm_context *unused, int snum, const static bool handle_printing(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr); static bool handle_ldap_debug_level(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr); -/* these are parameter handlers which are not needed in the - * source3 code - */ - -#define handle_logfile NULL - static void set_allowed_client_auth(void); static void add_to_file_list(const char *fname, const char *subfname);