1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3-debug Remove last direct assignements to DEBUGLEVEL

All future assignments of the debug level should go via
lp_set_cmdline("log level", "x") because this will ensure the value is
not overwritten in an smb.conf load.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2010-10-29 15:29:09 +11:00
parent cf4de8ec2c
commit d9f67eebf6
6 changed files with 8 additions and 6 deletions

View File

@ -90,8 +90,10 @@ smbc_getDebug(SMBCCTX *c)
void
smbc_setDebug(SMBCCTX *c, int debug)
{
char buf[32];
snprintf(buf, sizeof(buf), "%d", debug);
c->debug = debug;
DEBUGLEVEL = debug;
lp_set_cmdline("log level", buf);
}
/**

View File

@ -324,7 +324,7 @@ static NTSTATUS cmd_debuglevel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
}
if (argc == 2) {
DEBUGLEVEL = atoi(argv[1]);
lp_set_cmdline("log level", argv[1]);
}
printf("debuglevel is %d\n", DEBUGLEVEL);

View File

@ -515,7 +515,7 @@ static void usage(void)
NumLoops = atoi(optarg);
break;
case 'd':
DEBUGLEVEL = atoi(optarg);
lp_set_cmdline("log level", optarg);
break;
case 'E':
die_on_error = 1;

View File

@ -8009,7 +8009,7 @@ static void usage(void)
torture_numops = atoi(optarg);
break;
case 'd':
DEBUGLEVEL = atoi(optarg);
lp_set_cmdline("log level", optarg);
break;
case 'O':
sockops = optarg;

View File

@ -188,7 +188,7 @@ static NTSTATUS cmd_debuglevel(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a
}
if (argc == 2) {
DEBUGLEVEL = atoi(argv[1]);
lp_set_cmdline("log level", argv[1]);
}
printf("debuglevel is %d\n", DEBUGLEVEL);

View File

@ -152,7 +152,7 @@ static int process_options(int argc, char **argv, int local_flags)
lp_set_name_resolve_order(optarg);
break;
case 'D':
DEBUGLEVEL = atoi(optarg);
lp_set_cmdline("log level", optarg);
break;
case 'U': {
got_username = True;