From 0ac7792e022107c352f5464f52563c4e885272dd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 2 Feb 2009 10:17:00 +0100 Subject: s4:libcliraw: s/private/private_data metze --- source4/libcli/composite/composite.c | 4 ++-- source4/libcli/raw/clioplock.c | 2 +- source4/libcli/raw/clitransport.c | 4 ++-- source4/libcli/raw/libcliraw.h | 6 +++--- source4/libcli/raw/rawrequest.c | 2 +- source4/libcli/smb_composite/appendacl.c | 12 ++++++------ source4/libcli/smb_composite/connect.c | 10 +++++----- source4/libcli/smb_composite/fsinfo.c | 4 ++-- source4/libcli/smb_composite/loadfile.c | 10 +++++----- source4/libcli/smb_composite/savefile.c | 10 +++++----- source4/libcli/smb_composite/sesssetup.c | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index a6b1c68d1c..ab32175d00 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -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, diff --git a/source4/libcli/raw/clioplock.c b/source4/libcli/raw/clioplock.c index 5005f878af..42ac6b517b 100644 --- a/source4/libcli/raw/clioplock.c +++ b/source4/libcli/raw/clioplock.c @@ -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; } diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index e6f27b1159..1fa27e37ea 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -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) { diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 1b9cba8e38..a9fcdab9cc 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -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; }; diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index a257e3d0f1..029d56428d 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -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; diff --git a/source4/libcli/smb_composite/appendacl.c b/source4/libcli/smb_composite/appendacl.c index 1f06b96e75..69ed62a106 100644 --- a/source4/libcli/smb_composite/appendacl.c +++ b/source4/libcli/smb_composite/appendacl.c @@ -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; diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index e0f4919f0b..3db777ddc8 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -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); } diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c index 7c9c7963f4..3bc93b62ab 100644 --- a/source4/libcli/smb_composite/fsinfo.c +++ b/source4/libcli/smb_composite/fsinfo.c @@ -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); } diff --git a/source4/libcli/smb_composite/loadfile.c b/source4/libcli/smb_composite/loadfile.c index 952f24b811..994c29c77d 100644 --- a/source4/libcli/smb_composite/loadfile.c +++ b/source4/libcli/smb_composite/loadfile.c @@ -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; diff --git a/source4/libcli/smb_composite/savefile.c b/source4/libcli/smb_composite/savefile.c index f02ca46f06..25a35c01a9 100644 --- a/source4/libcli/smb_composite/savefile.c +++ b/source4/libcli/smb_composite/savefile.c @@ -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; diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 7c9d1fb731..83d15e98eb 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -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); -- cgit