summaryrefslogtreecommitdiff
path: root/source4/torture/nbench
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 15:53:07 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:27 +0100
commit0a2f1a46a02d2c9497d05d7e534829dc6e9430dc (patch)
tree5647b3b0b98f97abc84a47a19613938345e0384c /source4/torture/nbench
parent53ae9bc9f6f66578948c3995073bdc1f1acae0f1 (diff)
downloadsamba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.gz
samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.bz2
samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.zip
r26249: Remove a couple more uses of global_loadparm.
(This used to be commit 80a61200508a00d5b16a3e748ce92d54b9fefcd2)
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r--source4/torture/nbench/nbench.c8
-rw-r--r--source4/torture/nbench/nbio.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index ddedd102f9..e9bd32cce0 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -39,14 +39,14 @@ static int read_only;
static unsigned long nb_max_retries;
#define NB_RETRY(op) \
- for (n=0;n<=nb_max_retries && !op;n++) do_reconnect(&cli, client)
+ for (n=0;n<=nb_max_retries && !op;n++) do_reconnect(&cli, tctx, client)
-static void do_reconnect(struct smbcli_state **cli, int client)
+static void do_reconnect(struct smbcli_state **cli, struct torture_context *tctx, int client)
{
int n;
printf("[%d] Reconnecting client %d\n", nbench_line_count, client);
for (n=0;n<nb_max_retries;n++) {
- if (nb_reconnect(cli, client)) {
+ if (nb_reconnect(cli, tctx, client)) {
printf("[%d] Reconnected client %d\n", nbench_line_count, client);
return;
}
@@ -244,7 +244,7 @@ bool torture_nbench(struct torture_context *torture)
}
if (torture_nprocs > 1) {
- if (!torture_open_connection(&cli, 0)) {
+ if (!torture_open_connection(&cli, torture, 0)) {
return false;
}
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index 5de903ff78..2664d3e7f5 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -157,7 +157,7 @@ static bool nb_reopen_all_files(void)
return true;
}
-bool nb_reconnect(struct smbcli_state **cli, int client)
+bool nb_reconnect(struct smbcli_state **cli, struct torture_context *tctx, int client)
{
children[client].connected = false;
@@ -165,7 +165,7 @@ bool nb_reconnect(struct smbcli_state **cli, int client)
talloc_free(*cli);
}
- if (!torture_open_connection(cli, client)) {
+ if (!torture_open_connection(cli, tctx, client)) {
printf("nb_reconnect: failed to connect\n");
*cli = NULL;
return false;