diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-07 03:01:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:42 +0100 |
commit | bca631be1f4cefeec3d64cd552ec6d9ee9cc1971 (patch) | |
tree | 375d4e22cbf3be367dccc82a50391b5756921e81 /source4/torture | |
parent | 6c77f353d3d952b46b401ab29837ba5b75e353c2 (diff) | |
download | samba-bca631be1f4cefeec3d64cd552ec6d9ee9cc1971.tar.gz samba-bca631be1f4cefeec3d64cd552ec6d9ee9cc1971.tar.bz2 samba-bca631be1f4cefeec3d64cd552ec6d9ee9cc1971.zip |
r26329: Fix more loadparm_context references. Only about a 100 left now.
(This used to be commit ddf233346d848e91bc6a6a572f0f6120540503b7)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/locktest.c | 15 | ||||
-rw-r--r-- | source4/torture/nbt/winsbench.c | 4 |
2 files changed, 11 insertions, 8 deletions
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c index 2aa074c6c3..08050fc40a 100644 --- a/source4/torture/locktest.c +++ b/source4/torture/locktest.c @@ -168,7 +168,8 @@ static struct smbcli_state *connect_one(struct loadparm_context *lp_ctx, } -static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum[NSERVERS][NCONNECTIONS][NFILES], +static void reconnect(struct loadparm_context *lp_ctx, + struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum[NSERVERS][NCONNECTIONS][NFILES], char *share[NSERVERS]) { int server, conn, f; @@ -184,7 +185,7 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum } talloc_free(cli[server][conn]); } - cli[server][conn] = connect_one(global_loadparm, share[server], + cli[server][conn] = connect_one(lp_ctx, share[server], server, conn); if (!cli[server][conn]) { DEBUG(0,("Failed to connect to %s\n", share[server])); @@ -387,7 +388,7 @@ static int retest(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], we then do random locking ops in tamdem on the 4 fnums from each server and ensure that the results match */ -static void test_locks(char *share[NSERVERS]) +static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS]) { struct smbcli_state *cli[NSERVERS][NCONNECTIONS]; int fnum[NSERVERS][NCONNECTIONS][NFILES]; @@ -438,7 +439,7 @@ static void test_locks(char *share[NSERVERS]) #endif } - reconnect(cli, fnum, share); + reconnect(lp_ctx, cli, fnum, share); open_files(cli, fnum); n = retest(cli, fnum, numops); @@ -451,7 +452,7 @@ static void test_locks(char *share[NSERVERS]) n1 = n; close_files(cli, fnum); - reconnect(cli, fnum, share); + reconnect(lp_ctx, cli, fnum, share); open_files(cli, fnum); for (i=0;i<n-skip;i+=skip) { @@ -489,7 +490,7 @@ static void test_locks(char *share[NSERVERS]) } close_files(cli, fnum); - reconnect(cli, fnum, share); + reconnect(lp_ctx, cli, fnum, share); open_files(cli, fnum); showall = true; n1 = retest(cli, fnum, n); @@ -649,7 +650,7 @@ static void usage(void) seed, lock_base, lock_range, min_length)); srandom(seed); - test_locks(share); + test_locks(lp_ctx, share); return(0); } diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c index 1c79b5eb75..82223d9dd7 100644 --- a/source4/torture/nbt/winsbench.c +++ b/source4/torture/nbt/winsbench.c @@ -35,6 +35,7 @@ struct wins_state { int pass_count; int fail_count; const char *wins_server; + uint16_t wins_port; const char *my_ip; uint32_t ttl; }; @@ -185,7 +186,7 @@ static void generate_query(struct nbt_name_socket *nbtsock, struct wins_state *s io.in.name = generate_name(tmp_ctx, idx); io.in.dest_addr = state->wins_server; - io.in.dest_port = lp_nbt_port(global_loadparm); + io.in.dest_port = state->wins_port; io.in.broadcast = false; io.in.wins_lookup = true; io.in.timeout = 2; @@ -241,6 +242,7 @@ static bool bench_wins(struct torture_context *tctx) state->num_names = torture_entries; state->registered = talloc_zero_array(state, bool, state->num_names); state->wins_server = address; + state->wins_port = lp_nbt_port(tctx->lp_ctx); state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address)); state->ttl = timelimit; |