#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"
static void echo_completion(struct smbcli_request *req)
{
- struct benchlock_state *state = talloc_get_type(req->async.private,
- struct benchlock_state);
+ struct benchlock_state *state = (struct benchlock_state *)req->async.private;
NTSTATUS status = smbcli_request_simple_recv(req);
if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
p.in.size = 0;
p.in.data = NULL;
req = smb_raw_echo_send(state[i].tree->session->transport, &p);
- req->async.private = state;
+ req->async.private = &state[i];
req->async.fn = echo_completion;
}
}
progress = torture_setting_bool(torture, "progress", true);
- nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ nprocs = lp_parm_int(NULL, "torture", "nprocs", 4);
state = talloc_zero_array(mem_ctx, struct benchlock_state, nprocs);
smbcli_deltree(state[0].tree, BASEDIR);
talloc_free(mem_ctx);
+ printf("\n");
return ret;
failed:
talloc_free(mem_ctx);
- return False;
+ return false;
}