diff options
Diffstat (limited to 'source4/torture/raw/lockbench.c')
-rw-r--r-- | source4/torture/raw/lockbench.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index 44b60b8695..855364b169 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -30,6 +30,7 @@ #include "lib/cmdline/popt_common.h" #include "libcli/composite/composite.h" #include "libcli/smb_composite/smb_composite.h" +#include "param/param.h" #define BASEDIR "\\benchlock" #define FNAME BASEDIR "\\lock.dat" @@ -188,8 +189,8 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te, io->in.service = share; io->in.service_type = state->service_type; io->in.credentials = cmdline_credentials; - io->in.fallback_to_anonymous = False; - io->in.workgroup = lp_workgroup(); + io->in.fallback_to_anonymous = false; + io->in.workgroup = lp_workgroup(global_loadparm); /* kill off the remnants of the old connection */ talloc_free(state->tree); @@ -302,9 +303,9 @@ static void report_rate(struct event_context *ev, struct timed_event *te, /* benchmark locking calls */ -BOOL torture_bench_lock(struct torture_context *torture) +bool torture_bench_lock(struct torture_context *torture) { - BOOL ret = True; + bool ret = true; TALLOC_CTX *mem_ctx = talloc_new(torture); int i; int timelimit = torture_setting_int(torture, "timelimit", 10); @@ -317,7 +318,7 @@ BOOL torture_bench_lock(struct torture_context *torture) progress = torture_setting_bool(torture, "progress", true); - nprocs = lp_parm_int(-1, "torture", "nprocs", 4); + nprocs = lp_parm_int(global_loadparm, NULL, "torture", "nprocs", 4); state = talloc_zero_array(mem_ctx, struct benchlock_state, nprocs); @@ -327,7 +328,7 @@ BOOL torture_bench_lock(struct torture_context *torture) state[i].client_num = i; state[i].ev = ev; if (!torture_open_connection_ev(&cli, i, ev)) { - return False; + return false; } talloc_steal(mem_ctx, state); state[i].tree = cli->tree; |