From 9ed10f83d76eba1c4d4ac19842314f24db1c7a65 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Dec 2001 22:27:05 +0000 Subject: Removed global debugf. Replaced with lp_set_logfile(name). Fixed winbindd to finally stop leaving log. file droppings :-). Jeremy. (This used to be commit 0bea6cf79a44f79fa3a4f2c8381e898e79c66509) --- source3/nmbd/nmbd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source3/nmbd/nmbd.c') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 963e265330..80d712036d 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -26,8 +26,6 @@ #include "includes.h" -extern pstring debugf; - int ClientNMB = -1; int ClientDGRAM = -1; int global_nmb_port = -1; @@ -103,7 +101,7 @@ static BOOL dump_core(void) { char *p; pstring dname; - pstrcpy( dname, debugf ); + pstrcpy( dname, lp_logfile() ); if ((p=strrchr_m(dname,'/'))) *p=0; pstrcat( dname, "/corefiles" ); @@ -662,6 +660,7 @@ static void usage(char *pname) extern char *optarg; extern BOOL append_log; BOOL opt_interactive = False; + pstring logfile; append_log = True; /* Default, override with '-o' option. */ @@ -672,7 +671,8 @@ static void usage(char *pname) sys_srandom(time(NULL) ^ sys_getpid()); - slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", dyn_LOGFILEBASE); + slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE); + lp_set_logfile(logfile); /* this is for people who can't start the program correctly */ while (argc > 1 && (*argv[1] != '-')) @@ -728,7 +728,8 @@ static void usage(char *pname) strupper(global_myname); break; case 'l': - slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", optarg); + slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", optarg); + lp_set_logfile(logfile); break; case 'a': append_log = True; -- cgit