From 9da4ace1d9789d300ab298bc34694c44b2062f30 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Oct 2010 14:19:32 +1100 Subject: s3-debug Impove setup_logging() to specify logging to stderr This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett --- source3/nmbd/nmbd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/nmbd') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index fcbe50842d..e93ff82333 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -863,8 +863,11 @@ static bool open_sockets(bool isdaemon, int port) DEBUG(0,("ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n")); exit(1); } - - setup_logging( argv[0], log_stdout ); + if (log_stdout) { + setup_logging( argv[0], DEBUG_STDOUT); + } else { + setup_logging( argv[0], DEBUG_FILE); + } reopen_logs(); @@ -1024,8 +1027,8 @@ static bool open_sockets(bool isdaemon, int port) TALLOC_FREE(frame); process(); - if (dbf) - x_fclose(dbf); + debug_close_dbf(); + kill_async_dns_child(); return(0); } -- cgit