From: Rafal Szczesniak Date: Sat, 19 Jul 2003 00:23:08 +0000 (+0000) Subject: According to the result of voting, net has default debug level with X-Git-Tag: initial-v3-0-unstable~7771 X-Git-Url: http://git.samba.org/samba.git/?p=tprouty%2Fsamba.git;a=commitdiff_plain;h=b65fe75bec8170ad48d1ad0a9017ccc4de651eba According to the result of voting, net has default debug level with ability to change it by command line instead of turn-off cmdline switch for debug messages. It's a bit more comfortable to use now. --- diff --git a/source/utils/net.c b/source/utils/net.c index e643a3d10d..f99b2bad84 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -77,6 +77,8 @@ static int opt_machine_pass = 0; BOOL opt_have_ip = False; struct in_addr opt_dest_ip; +extern BOOL AllowDebugChange; + /***************************************************************************** stubb functions ****************************************************************************/ @@ -580,6 +582,8 @@ static struct functable net_func[] = { zero_ip(&opt_dest_ip); + /* set default debug level to 0 regardless of what smb.conf sets */ + DEBUGLEVEL_CLASS[DBGC_ALL] = 0; dbf = x_stderr; pc = poptGetContext(NULL, argc, (const char **) argv, long_options, @@ -615,9 +619,14 @@ static struct functable net_func[] = { } } - lp_load(dyn_CONFIGFILE,True,False,False); - - argv_new = (const char **)poptGetArgs(pc); + /* + * Don't load debug level from smb.conf. It should be + * set by cmdline arg or remain default (0) + */ + AllowDebugChange = False; + lp_load(dyn_CONFIGFILE,True,False,False); + + argv_new = (const char **)poptGetArgs(pc); argc_new = argc; for (i=0; i