1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:libcliraw: s/private/private_data

metze
This commit is contained in:
Stefan Metzmacher 2009-02-02 10:17:00 +01:00
parent e5e0a06485
commit 0ac7792e02
19 changed files with 79 additions and 79 deletions

View File

@ -86,7 +86,7 @@ _PUBLIC_ NTSTATUS composite_wait_free(struct composite_context *c)
this is used to allow for a composite function to complete without
going through any state transitions. When that happens the caller
has had no opportunity to fill in the async callback fields
(ctx->async.fn and ctx->async.private) which means the usual way of
(ctx->async.fn and ctx->async.private_data) which means the usual way of
dealing with composite functions doesn't work. To cope with this,
we trigger a timer event that will happen then the event loop is
re-entered. This gives the caller a chance to setup the callback,
@ -194,7 +194,7 @@ _PUBLIC_ void composite_continue_smb(struct composite_context *ctx,
{
if (composite_nomem(new_req, ctx)) return;
new_req->async.fn = continuation;
new_req->async.private = private_data;
new_req->async.private_data = private_data;
}
_PUBLIC_ void composite_continue_smb2(struct composite_context *ctx,

View File

@ -58,5 +58,5 @@ _PUBLIC_ void smbcli_oplock_handler(struct smbcli_transport *transport,
void *private_data)
{
transport->oplock.handler = handler;
transport->oplock.private = private_data;
transport->oplock.private_data = private_data;
}

View File

@ -317,7 +317,7 @@ static void idle_handler(struct tevent_context *ev,
transport,
next,
idle_handler, transport);
transport->idle.func(transport, transport->idle.private);
transport->idle.func(transport, transport->idle.private_data);
}
/*
@ -330,7 +330,7 @@ _PUBLIC_ void smbcli_transport_idle_handler(struct smbcli_transport *transport,
void *private_data)
{
transport->idle.func = idle_func;
transport->idle.private = private_data;
transport->idle.private_data = private_data;
transport->idle.period = period;
if (transport->socket->event.te != NULL) {

View File

@ -128,7 +128,7 @@ struct smbcli_transport {
for a packet */
struct {
void (*func)(struct smbcli_transport *, void *);
void *private;
void *private_data;
uint_t period;
} idle;
@ -151,7 +151,7 @@ struct smbcli_transport {
bool (*handler)(struct smbcli_transport *transport,
uint16_t tid, uint16_t fnum, uint8_t level, void *private_data);
/* private data passed to the oplock handler */
void *private;
void *private_data;
} oplock;
/* a list of async requests that are pending for receive on this connection */
@ -286,7 +286,7 @@ struct smbcli_request {
*/
struct {
void (*fn)(struct smbcli_request *);
void *private;
void *private_data;
} async;
};

View File

@ -388,7 +388,7 @@ bool smbcli_handle_oplock_break(struct smbcli_transport *transport, uint_t len,
uint16_t tid = SVAL(hdr, HDR_TID);
uint16_t fnum = SVAL(vwv,VWV(2));
uint8_t level = CVAL(vwv,VWV(3)+1);
transport->oplock.handler(transport, tid, fnum, level, transport->oplock.private);
transport->oplock.handler(transport, tid, fnum, level, transport->oplock.private_data);
}
return true;

View File

@ -46,7 +46,7 @@ static NTSTATUS appendacl_open(struct composite_context *c,
/* set the handler */
state->req->async.fn = appendacl_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = APPENDACL_GET;
talloc_free (state->io_open);
@ -92,7 +92,7 @@ static NTSTATUS appendacl_get(struct composite_context *c,
/* call handler when done setting new security descriptor on file */
state->req->async.fn = appendacl_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = APPENDACL_SET;
talloc_free (state->io_fileinfo);
@ -124,7 +124,7 @@ static NTSTATUS appendacl_set(struct composite_context *c,
/* set the handler */
state->req->async.fn = appendacl_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = APPENDACL_GETAGAIN;
talloc_free (state->io_setfileinfo);
@ -159,7 +159,7 @@ static NTSTATUS appendacl_getagain(struct composite_context *c,
/* call the handler */
state->req->async.fn = appendacl_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = APPENDACL_CLOSEPATH;
talloc_free (state->io_fileinfo);
@ -188,7 +188,7 @@ static NTSTATUS appendacl_close(struct composite_context *c,
*/
static void appendacl_handler(struct smbcli_request *req)
{
struct composite_context *c = (struct composite_context *)req->async.private;
struct composite_context *c = (struct composite_context *)req->async.private_data;
struct appendacl_state *state = talloc_get_type(c->private_data, struct appendacl_state);
/* when this handler is called, the stage indicates what
@ -270,7 +270,7 @@ struct composite_context *smb_composite_appendacl_send(struct smbcli_tree *tree,
/* setup the callback handler */
state->req->async.fn = appendacl_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = APPENDACL_OPENPATH;
return c;

View File

@ -129,7 +129,7 @@ static NTSTATUS connect_session_setup_anon(struct composite_context *c,
}
state->req->async.fn = request_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = CONNECT_TCON;
return NT_STATUS_OK;
@ -215,7 +215,7 @@ static NTSTATUS connect_session_setup(struct composite_context *c,
}
state->req->async.fn = request_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = CONNECT_TCON;
return NT_STATUS_OK;
@ -285,7 +285,7 @@ static NTSTATUS connect_send_negprot(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(state->req);
state->req->async.fn = request_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = CONNECT_NEGPROT;
return NT_STATUS_OK;
@ -354,7 +354,7 @@ static NTSTATUS connect_socket(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(state->req);
state->req->async.fn = request_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = CONNECT_SESSION_REQUEST;
return NT_STATUS_OK;
@ -434,7 +434,7 @@ static void state_handler(struct composite_context *c)
*/
static void request_handler(struct smbcli_request *req)
{
struct composite_context *c = talloc_get_type(req->async.private,
struct composite_context *c = talloc_get_type(req->async.private_data,
struct composite_context);
state_handler(c);
}

View File

@ -47,7 +47,7 @@ static NTSTATUS fsinfo_connect(struct composite_context *c,
state->fsinfo);
NT_STATUS_HAVE_NO_MEMORY(state->req);
state->req->async.private = c;
state->req->async.private_data = c;
state->req->async.fn = fsinfo_raw_handler;
state->stage = FSINFO_QUERY;
@ -110,7 +110,7 @@ static void fsinfo_state_handler(struct composite_context *creq)
*/
static void fsinfo_raw_handler(struct smbcli_request *req)
{
struct composite_context *c = talloc_get_type(req->async.private,
struct composite_context *c = talloc_get_type(req->async.private_data,
struct composite_context);
fsinfo_state_handler(c);
}

View File

@ -61,7 +61,7 @@ static NTSTATUS setup_close(struct composite_context *c,
/* call the handler again when the close is done */
state->req->async.fn = loadfile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = LOADFILE_CLOSE;
return NT_STATUS_OK;
@ -113,7 +113,7 @@ static NTSTATUS loadfile_open(struct composite_context *c,
/* call the handler again when the first read is done */
state->req->async.fn = loadfile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = LOADFILE_READ;
talloc_free(state->io_open);
@ -152,7 +152,7 @@ static NTSTATUS loadfile_read(struct composite_context *c,
/* call the handler again when the read is done */
state->req->async.fn = loadfile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
return NT_STATUS_OK;
}
@ -180,7 +180,7 @@ static NTSTATUS loadfile_close(struct composite_context *c,
*/
static void loadfile_handler(struct smbcli_request *req)
{
struct composite_context *c = (struct composite_context *)req->async.private;
struct composite_context *c = (struct composite_context *)req->async.private_data;
struct loadfile_state *state = talloc_get_type(c->private_data, struct loadfile_state);
/* when this handler is called, the stage indicates what
@ -250,7 +250,7 @@ struct composite_context *smb_composite_loadfile_send(struct smbcli_tree *tree,
/* setup the callback handler */
state->req->async.fn = loadfile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
state->stage = LOADFILE_OPEN;
return c;

View File

@ -64,7 +64,7 @@ static NTSTATUS setup_close(struct composite_context *c,
/* call the handler again when the close is done */
state->stage = SAVEFILE_CLOSE;
state->req->async.fn = savefile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
return NT_STATUS_OK;
}
@ -108,7 +108,7 @@ static NTSTATUS savefile_open(struct composite_context *c,
/* call the handler again when the first write is done */
state->stage = SAVEFILE_WRITE;
state->req->async.fn = savefile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
talloc_free(state->io_open);
return NT_STATUS_OK;
@ -149,7 +149,7 @@ static NTSTATUS savefile_write(struct composite_context *c,
/* call the handler again when the write is done */
state->req->async.fn = savefile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
return NT_STATUS_OK;
}
@ -181,7 +181,7 @@ static NTSTATUS savefile_close(struct composite_context *c,
*/
static void savefile_handler(struct smbcli_request *req)
{
struct composite_context *c = (struct composite_context *)req->async.private;
struct composite_context *c = (struct composite_context *)req->async.private_data;
struct savefile_state *state = talloc_get_type(c->private_data, struct savefile_state);
/* when this handler is called, the stage indicates what
@ -254,7 +254,7 @@ struct composite_context *smb_composite_savefile_send(struct smbcli_tree *tree,
/* setup the callback handler */
state->req->async.fn = savefile_handler;
state->req->async.private = c;
state->req->async.private_data = c;
c->private_data = state;
return c;

View File

@ -80,7 +80,7 @@ static void set_user_session_key(struct smbcli_session *session,
*/
static void request_handler(struct smbcli_request *req)
{
struct composite_context *c = (struct composite_context *)req->async.private;
struct composite_context *c = (struct composite_context *)req->async.private_data;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
struct smbcli_session *session = req->session;
DATA_BLOB session_key = data_blob(NULL, 0);

View File

@ -84,7 +84,7 @@ static void smb_read_callback(struct smbcli_request *req)
uint16_t frag_length;
NTSTATUS status;
state = talloc_get_type(req->async.private, struct smb_read_state);
state = talloc_get_type(req->async.private_data, struct smb_read_state);
smb = talloc_get_type(state->c->transport.private_data, struct smb_private);
io = state->io;
@ -133,7 +133,7 @@ static void smb_read_callback(struct smbcli_request *req)
}
state->req->async.fn = smb_read_callback;
state->req->async.private = state;
state->req->async.private_data = state;
}
/*
@ -185,7 +185,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
}
req->async.fn = smb_read_callback;
req->async.private = state;
req->async.private_data = state;
state->req = req;
@ -221,7 +221,7 @@ struct smb_trans_state {
*/
static void smb_trans_callback(struct smbcli_request *req)
{
struct smb_trans_state *state = (struct smb_trans_state *)req->async.private;
struct smb_trans_state *state = (struct smb_trans_state *)req->async.private_data;
struct dcerpc_connection *c = state->c;
NTSTATUS status;
@ -293,7 +293,7 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b
}
state->req->async.fn = smb_trans_callback;
state->req->async.private = state;
state->req->async.private_data = state;
talloc_steal(state, state->req);
@ -305,7 +305,7 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b
*/
static void smb_write_callback(struct smbcli_request *req)
{
struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private;
struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private_data;
if (!NT_STATUS_IS_OK(req->status)) {
DEBUG(0,("dcerpc_smb: write callback error\n"));
@ -351,7 +351,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
}
req->async.fn = smb_write_callback;
req->async.private = c;
req->async.private_data = c;
if (trigger_read) {
send_read_request(c);
@ -501,7 +501,7 @@ struct composite_context *dcerpc_pipe_open_smb_send(struct dcerpc_pipe *p,
static void pipe_open_recv(struct smbcli_request *req)
{
struct pipe_open_smb_state *state = talloc_get_type(req->async.private,
struct pipe_open_smb_state *state = talloc_get_type(req->async.private_data,
struct pipe_open_smb_state);
struct composite_context *ctx = state->ctx;
struct dcerpc_connection *c = state->c;

View File

@ -289,7 +289,7 @@ static int async_info_destructor(struct async_info *async)
*/
static void async_simple(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smbcli_request_simple_recv(c_req);
talloc_free(async);
@ -310,7 +310,7 @@ static void async_simple(struct smbcli_request *c_req)
async->cvfs = p; \
async->c_req = c_req; \
DLIST_ADD(p->pending, async); \
c_req->async.private = async; \
c_req->async.private_data = async; \
talloc_set_destructor(async, async_info_destructor); \
} \
c_req->async.fn = async_fn; \
@ -350,7 +350,7 @@ static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs,
*/
static void async_ioctl(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_ioctl_recv(c_req, req, async->parms);
talloc_free(async);
@ -404,7 +404,7 @@ static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs,
*/
static void async_qpathinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
talloc_free(async);
@ -436,7 +436,7 @@ static NTSTATUS cvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
*/
static void async_qfileinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
talloc_free(async);
@ -490,7 +490,7 @@ static NTSTATUS cvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
*/
static void async_open(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct cvfs_private *cvfs = async->cvfs;
struct ntvfs_request *req = async->req;
struct cvfs_file *f = async->f;
@ -638,7 +638,7 @@ static NTSTATUS cvfs_copy(struct ntvfs_module_context *ntvfs,
*/
static void async_read(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_read_recv(c_req, async->parms);
talloc_free(async);
@ -677,7 +677,7 @@ static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
*/
static void async_write(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_write_recv(c_req, async->parms);
talloc_free(async);
@ -715,7 +715,7 @@ static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
*/
static void async_seek(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_seek_recv(c_req, async->parms);
talloc_free(async);
@ -930,7 +930,7 @@ static NTSTATUS cvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
*/
static void async_fsinfo(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
talloc_free(async);
@ -1010,7 +1010,7 @@ static NTSTATUS cvfs_search_close(struct ntvfs_module_context *ntvfs,
*/
static void async_trans2(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
talloc_free(async);
@ -1054,7 +1054,7 @@ static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
*/
static void async_changenotify(struct smbcli_request *c_req)
{
struct async_info *async = c_req->async.private;
struct async_info *async = c_req->async.private_data;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_changenotify_recv(c_req, req, async->parms);
talloc_free(async);

View File

@ -510,7 +510,7 @@ static NTSTATUS benchrw_close(struct torture_context *tctx,
NT_STATUS_HAVE_NO_MEMORY(req);
/*register the callback function!*/
req->async.fn = benchrw_callback;
req->async.private = state;
req->async.private_data = state;
return NT_STATUS_OK;
}
@ -521,7 +521,7 @@ static void benchrw_callback(struct smbcli_request *req);
static void benchrw_rw_callback(struct smbcli_request *req)
{
struct benchrw_state *state = req->async.private;
struct benchrw_state *state = req->async.private_data;
struct torture_context *tctx = state->tctx;
if (!NT_STATUS_IS_OK(req->status)) {
@ -596,7 +596,7 @@ static NTSTATUS benchrw_readwrite(struct torture_context *tctx,
NT_STATUS_HAVE_NO_MEMORY(req);
/*register the callback function!*/
req->async.fn = benchrw_rw_callback;
req->async.private = state;
req->async.private_data = state;
return NT_STATUS_OK;
}
@ -644,7 +644,7 @@ static NTSTATUS benchrw_open(struct torture_context *tctx,
/*register the callback function!*/
req->async.fn = benchrw_callback;
req->async.private = state;
req->async.private_data = state;
return NT_STATUS_OK;
}
@ -691,7 +691,7 @@ static NTSTATUS benchrw_mkdir(struct torture_context *tctx,
/*register the callback function!*/
req->async.fn = benchrw_callback;
req->async.private = state;
req->async.private_data = state;
return NT_STATUS_OK;
}
@ -701,7 +701,7 @@ static NTSTATUS benchrw_mkdir(struct torture_context *tctx,
*/
static void benchrw_callback(struct smbcli_request *req)
{
struct benchrw_state *state = req->async.private;
struct benchrw_state *state = req->async.private_data;
struct torture_context *tctx = state->tctx;
/*dont send new requests when torture_numops is reached*/
@ -913,7 +913,7 @@ bool run_benchrw(struct torture_context *tctx)
req = smb_raw_mkdir_send(state[i]->cli,&parms);
/* register callback fn + private data */
req->async.fn = benchrw_callback;
req->async.private=state[i];
req->async.private_data=state[i];
break;
/* error occured , finish */
case ERROR:

View File

@ -1024,7 +1024,7 @@ static bool oplock_handler_smb(struct smbcli_transport *transport, uint16_t tid,
}
req->async.fn = oplock_handler_close_recv_smb;
req->async.private = NULL;
req->async.private_data = NULL;
return true;
}

View File

@ -112,7 +112,7 @@ static void lock_send(struct benchlock_state *state)
DEBUG(0,("Failed to setup lock\n"));
lock_failed++;
}
state->req->async.private = state;
state->req->async.private_data = state;
state->req->async.fn = lock_completion;
}
@ -222,7 +222,7 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
*/
static void lock_completion(struct smbcli_request *req)
{
struct benchlock_state *state = (struct benchlock_state *)req->async.private;
struct benchlock_state *state = (struct benchlock_state *)req->async.private_data;
NTSTATUS status = smbcli_request_simple_recv(req);
state->req = NULL;
if (!NT_STATUS_IS_OK(status)) {
@ -262,7 +262,7 @@ static void lock_completion(struct smbcli_request *req)
static void echo_completion(struct smbcli_request *req)
{
struct benchlock_state *state = (struct benchlock_state *)req->async.private;
struct benchlock_state *state = (struct benchlock_state *)req->async.private_data;
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)) {
@ -305,7 +305,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
p.in.size = 0;
p.in.data = NULL;
req = smb_raw_echo_send(state[i].tree->session->transport, &p);
req->async.private = &state[i];
req->async.private_data = &state[i];
req->async.fn = echo_completion;
}
}

View File

@ -159,7 +159,7 @@ static void savefile_callback(struct composite_context *ctx)
*/
static void setoffline_callback(struct smbcli_request *req)
{
struct offline_state *state = req->async.private;
struct offline_state *state = req->async.private_data;
NTSTATUS status;
status = smbcli_request_simple_recv(req);
@ -183,7 +183,7 @@ static void setoffline_callback(struct smbcli_request *req)
*/
static void getoffline_callback(struct smbcli_request *req)
{
struct offline_state *state = req->async.private;
struct offline_state *state = req->async.private_data;
NTSTATUS status;
union smb_fileinfo io;
@ -286,7 +286,7 @@ static void test_offline(struct offline_state *state)
}
state->req->async.fn = setoffline_callback;
state->req->async.private = state;
state->req->async.private_data = state;
break;
}
@ -303,7 +303,7 @@ static void test_offline(struct offline_state *state)
}
state->req->async.fn = getoffline_callback;
state->req->async.private = state;
state->req->async.private_data = state;
break;
}
@ -318,7 +318,7 @@ static void test_offline(struct offline_state *state)
static void echo_completion(struct smbcli_request *req)
{
struct offline_state *state = (struct offline_state *)req->async.private;
struct offline_state *state = (struct offline_state *)req->async.private_data;
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)) {
@ -380,7 +380,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
p.in.size = 0;
p.in.data = NULL;
req = smb_raw_echo_send(state[i].tree->session->transport, &p);
req->async.private = &state[i];
req->async.private_data = &state[i];
req->async.fn = echo_completion;
}
}

View File

@ -186,7 +186,7 @@ static void next_open(struct benchopen_state *state)
state->req_open = smb_raw_open_send(state->tree, &state->open_parms);
state->req_open->async.fn = open_completed;
state->req_open->async.private = state;
state->req_open->async.private_data = state;
}
@ -203,7 +203,7 @@ static void next_close(struct benchopen_state *state)
state->req_close = smb_raw_close_send(state->tree, &state->close_parms);
state->req_close->async.fn = close_completed;
state->req_close->async.private = state;
state->req_close->async.private_data = state;
}
/*
@ -211,7 +211,7 @@ static void next_close(struct benchopen_state *state)
*/
static void open_completed(struct smbcli_request *req)
{
struct benchopen_state *state = (struct benchopen_state *)req->async.private;
struct benchopen_state *state = (struct benchopen_state *)req->async.private_data;
TALLOC_CTX *tmp_ctx = talloc_new(state->mem_ctx);
NTSTATUS status;
@ -243,7 +243,7 @@ static void open_completed(struct smbcli_request *req)
state->open_retries++;
state->req_open = smb_raw_open_send(state->tree, &state->open_parms);
state->req_open->async.fn = open_completed;
state->req_open->async.private = state;
state->req_open->async.private_data = state;
return;
}
@ -275,7 +275,7 @@ static void open_completed(struct smbcli_request *req)
*/
static void close_completed(struct smbcli_request *req)
{
struct benchopen_state *state = (struct benchopen_state *)req->async.private;
struct benchopen_state *state = (struct benchopen_state *)req->async.private_data;
NTSTATUS status = smbcli_request_simple_recv(req);
state->req_close = NULL;
@ -312,7 +312,7 @@ static void close_completed(struct smbcli_request *req)
static void echo_completion(struct smbcli_request *req)
{
struct benchopen_state *state = (struct benchopen_state *)req->async.private;
struct benchopen_state *state = (struct benchopen_state *)req->async.private_data;
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)) {
@ -357,7 +357,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
p.in.size = 0;
p.in.data = NULL;
req = smb_raw_echo_send(state[i].tree->session->transport, &p);
req->async.private = &state[i];
req->async.private_data = &state[i];
req->async.fn = echo_completion;
}
}

View File

@ -166,7 +166,7 @@ static bool oplock_handler_close(struct smbcli_transport *transport, uint16_t ti
}
req->async.fn = oplock_handler_close_recv;
req->async.private = NULL;
req->async.private_data = NULL;
return true;
}