From 40cd2d778093d7799b27b6beb37166d8a53f965c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 16 May 2007 14:52:54 +0000 Subject: r22944: fix bug #4618: rename private -> private_data metze (This used to be commit 58551f2f28fce8f1fcd04736c47ecd7458f32ea2) --- source4/librpc/rpc/dcerpc.c | 12 ++++++------ source4/librpc/rpc/dcerpc.h | 4 ++-- source4/librpc/rpc/dcerpc_schannel.c | 4 ++-- source4/librpc/rpc/dcerpc_smb.c | 28 ++++++++++++++-------------- source4/librpc/rpc/dcerpc_smb2.c | 26 +++++++++++++------------- source4/librpc/rpc/dcerpc_sock.c | 20 ++++++++++---------- source4/librpc/rpc/dcerpc_util.c | 2 +- 7 files changed, 48 insertions(+), 48 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index e422fa5444..4e46093573 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -527,7 +527,7 @@ static NTSTATUS dcerpc_map_reason(uint16_t reason) */ static void dcerpc_composite_fail(struct rpc_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); composite_error(c, req->status); } @@ -629,7 +629,7 @@ static void dcerpc_bind_recv_handler(struct rpc_request *req, struct composite_context *c; struct dcerpc_connection *conn; - c = talloc_get_type(req->async.private, struct composite_context); + c = talloc_get_type(req->async.private_data, struct composite_context); if (pkt->ptype == DCERPC_PKT_BIND_NAK) { DEBUG(2,("dcerpc: bind_nak reason %d\n", @@ -747,7 +747,7 @@ struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p, req->state = RPC_REQUEST_PENDING; req->call_id = pkt.call_id; - req->async.private = c; + req->async.private_data = c; req->async.callback = dcerpc_composite_fail; req->p = p; req->recv_handler = dcerpc_bind_recv_handler; @@ -958,7 +958,7 @@ static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, req->async_call = async; req->ignore_timeout = False; req->async.callback = NULL; - req->async.private = NULL; + req->async.private_data = NULL; req->recv_handler = NULL; if (object != NULL) { @@ -1526,7 +1526,7 @@ static void dcerpc_alter_recv_handler(struct rpc_request *req, struct composite_context *c; struct dcerpc_pipe *recv_pipe; - c = talloc_get_type(req->async.private, struct composite_context); + c = talloc_get_type(req->async.private_data, struct composite_context); recv_pipe = talloc_get_type(c->private_data, struct dcerpc_pipe); if (pkt->ptype == DCERPC_PKT_ALTER_RESP && @@ -1618,7 +1618,7 @@ struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p, req->state = RPC_REQUEST_PENDING; req->call_id = pkt.call_id; - req->async.private = c; + req->async.private_data = c; req->async.callback = dcerpc_composite_fail; req->p = p; req->recv_handler = dcerpc_alter_recv_handler; diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index ea6c68b28e..b0224af182 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -62,7 +62,7 @@ struct dcerpc_connection { struct dcerpc_transport { enum dcerpc_transport_t transport; - void *private; + void *private_data; NTSTATUS (*shutdown_pipe)(struct dcerpc_connection *, NTSTATUS status); @@ -258,7 +258,7 @@ struct rpc_request { struct { void (*callback)(struct rpc_request *); - void *private; + void *private_data; } async; }; diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c index d5a83b1bfa..15a0159be8 100644 --- a/source4/librpc/rpc/dcerpc_schannel.c +++ b/source4/librpc/rpc/dcerpc_schannel.c @@ -156,7 +156,7 @@ static void continue_srv_challenge(struct rpc_request *req) struct schannel_key_state *s; struct rpc_request *srv_auth2_req; - c = talloc_get_type(req->async.private, struct composite_context); + c = talloc_get_type(req->async.private_data, struct composite_context); s = talloc_get_type(c->private_data, struct schannel_key_state); /* receive rpc request result - netlogon challenge */ @@ -199,7 +199,7 @@ static void continue_srv_auth2(struct rpc_request *req) struct composite_context *c; struct schannel_key_state *s; - c = talloc_get_type(req->async.private, struct composite_context); + c = talloc_get_type(req->async.private_data, struct composite_context); s = talloc_get_type(c->private_data, struct schannel_key_state); /* receive rpc request result - auth2 credentials */ diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 7f0bcf0485..edeb898d5f 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -40,7 +40,7 @@ struct smb_private { */ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; if (smb->dead) { return; @@ -85,7 +85,7 @@ static void smb_read_callback(struct smbcli_request *req) NTSTATUS status; state = talloc_get_type(req->async.private, struct smb_read_state); - smb = talloc_get_type(state->c->transport.private, struct smb_private); + smb = talloc_get_type(state->c->transport.private_data, struct smb_private); io = state->io; status = smb_raw_read_recv(state->req, io); @@ -142,7 +142,7 @@ static void smb_read_callback(struct smbcli_request *req) */ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; union smb_read *io; struct smb_read_state *state; struct smbcli_request *req; @@ -198,7 +198,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO */ static NTSTATUS send_read_request(struct dcerpc_connection *c) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; if (smb->dead) { return NT_STATUS_CONNECTION_DISCONNECTED; @@ -250,7 +250,7 @@ static void smb_trans_callback(struct smbcli_request *req) */ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *blob) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; struct smb_trans2 *trans; uint16_t setup[2]; struct smb_trans_state *state; @@ -313,7 +313,7 @@ static void smb_write_callback(struct smbcli_request *req) */ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, BOOL trigger_read) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; union smb_write io; struct smbcli_request *req; @@ -357,7 +357,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, B */ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; union smb_close io; struct smbcli_request *req; @@ -383,7 +383,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) */ static const char *smb_peer_name(struct dcerpc_connection *c) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; return smb->server_name; } @@ -392,7 +392,7 @@ static const char *smb_peer_name(struct dcerpc_connection *c) */ static const char *smb_target_hostname(struct dcerpc_connection *c) { - struct smb_private *smb = talloc_get_type(c->transport.private, struct smb_private); + struct smb_private *smb = talloc_get_type(c->transport.private_data, struct smb_private); return smb->tree->session->transport->socket->hostname; } @@ -401,7 +401,7 @@ static const char *smb_target_hostname(struct dcerpc_connection *c) */ static NTSTATUS smb_session_key(struct dcerpc_connection *c, DATA_BLOB *session_key) { - struct smb_private *smb = c->transport.private; + struct smb_private *smb = c->transport.private_data; if (smb->tree->session->user_session_key.data) { *session_key = smb->tree->session->user_session_key; @@ -504,7 +504,7 @@ static void pipe_open_recv(struct smbcli_request *req) fill in the transport methods */ c->transport.transport = NCACN_NP; - c->transport.private = NULL; + c->transport.private_data = NULL; c->transport.shutdown_pipe = smb_shutdown_pipe; c->transport.peer_name = smb_peer_name; c->transport.target_hostname = smb_target_hostname; @@ -526,7 +526,7 @@ static void pipe_open_recv(struct smbcli_request *req) if (composite_nomem(smb->server_name, ctx)) return; smb->dead = false; - c->transport.private = smb; + c->transport.private_data = smb; composite_done(ctx); } @@ -556,7 +556,7 @@ struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c) if (c->transport.transport != NCACN_NP) return NULL; - smb = talloc_get_type(c->transport.private, struct smb_private); + smb = talloc_get_type(c->transport.private_data, struct smb_private); if (!smb) return NULL; return smb->tree; @@ -571,7 +571,7 @@ uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c) if (c->transport.transport != NCACN_NP) return 0; - smb = talloc_get_type(c->transport.private, struct smb_private); + smb = talloc_get_type(c->transport.private_data, struct smb_private); if (!smb) return 0; return smb->fnum; diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c index 56f8e9b85c..06160ff201 100644 --- a/source4/librpc/rpc/dcerpc_smb2.c +++ b/source4/librpc/rpc/dcerpc_smb2.c @@ -42,7 +42,7 @@ struct smb2_private { */ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) { - struct smb2_private *smb = c->transport.private; + struct smb2_private *smb = c->transport.private_data; if (smb->dead) { return; @@ -84,7 +84,7 @@ static void smb2_read_callback(struct smb2_request *req) NTSTATUS status; state = talloc_get_type(req->async.private, struct smb2_read_state); - smb = talloc_get_type(state->c->transport.private, struct smb2_private); + smb = talloc_get_type(state->c->transport.private_data, struct smb2_private); status = smb2_read_recv(req, state, &io); if (NT_STATUS_IS_ERR(status)) { @@ -147,7 +147,7 @@ static void smb2_read_callback(struct smb2_request *req) */ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob) { - struct smb2_private *smb = c->transport.private; + struct smb2_private *smb = c->transport.private_data; struct smb2_read io; struct smb2_read_state *state; struct smb2_request *req; @@ -192,7 +192,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO */ static NTSTATUS send_read_request(struct dcerpc_connection *c) { - struct smb2_private *smb = c->transport.private; + struct smb2_private *smb = c->transport.private_data; if (smb->dead) { return NT_STATUS_CONNECTION_DISCONNECTED; @@ -243,7 +243,7 @@ static void smb2_trans_callback(struct smb2_request *req) */ static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *blob) { - struct smb2_private *smb = talloc_get_type(c->transport.private, + struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); struct smb2_ioctl io; struct smb2_trans_state *state; @@ -298,7 +298,7 @@ static void smb2_write_callback(struct smb2_request *req) static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, BOOL trigger_read) { - struct smb2_private *smb = c->transport.private; + struct smb2_private *smb = c->transport.private_data; struct smb2_write io; struct smb2_request *req; @@ -330,7 +330,7 @@ static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, */ static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) { - struct smb2_private *smb = c->transport.private; + struct smb2_private *smb = c->transport.private_data; struct smb2_close io; struct smb2_request *req; @@ -355,7 +355,7 @@ static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) */ static const char *smb2_peer_name(struct dcerpc_connection *c) { - struct smb2_private *smb = talloc_get_type(c->transport.private, + struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); return smb->server_name; } @@ -365,7 +365,7 @@ static const char *smb2_peer_name(struct dcerpc_connection *c) */ static const char *smb2_target_hostname(struct dcerpc_connection *c) { - struct smb2_private *smb = talloc_get_type(c->transport.private, + struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); return smb->tree->session->transport->socket->hostname; } @@ -375,7 +375,7 @@ static const char *smb2_target_hostname(struct dcerpc_connection *c) */ static NTSTATUS smb2_session_key(struct dcerpc_connection *c, DATA_BLOB *session_key) { - struct smb2_private *smb = talloc_get_type(c->transport.private, + struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); *session_key = smb->tree->session->session_key; if (session_key->data == NULL) { @@ -460,7 +460,7 @@ static void pipe_open_recv(struct smb2_request *req) fill in the transport methods */ c->transport.transport = NCACN_NP; - c->transport.private = NULL; + c->transport.private_data = NULL; c->transport.shutdown_pipe = smb2_shutdown_pipe; c->transport.peer_name = smb2_peer_name; c->transport.target_hostname = smb2_target_hostname; @@ -482,7 +482,7 @@ static void pipe_open_recv(struct smb2_request *req) if (composite_nomem(smb->server_name, ctx)) return; smb->dead = false; - c->transport.private = smb; + c->transport.private_data = smb; composite_done(ctx); } @@ -507,7 +507,7 @@ NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p, */ struct smb2_tree *dcerpc_smb2_tree(struct dcerpc_connection *c) { - struct smb2_private *smb = talloc_get_type(c->transport.private, + struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); return smb->tree; } diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index 547b3ffb43..f5f4f7c398 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -46,7 +46,7 @@ struct sock_private { */ static void sock_dead(struct dcerpc_connection *p, NTSTATUS status) { - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; if (!sock) return; @@ -112,7 +112,7 @@ static NTSTATUS sock_process_recv(void *private, DATA_BLOB blob) { struct dcerpc_connection *p = talloc_get_type(private, struct dcerpc_connection); - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; sock->pending_reads--; if (sock->pending_reads == 0) { packet_recv_disable(sock->packet); @@ -129,7 +129,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde, { struct dcerpc_connection *p = talloc_get_type(private, struct dcerpc_connection); - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; if (flags & EVENT_FD_WRITE) { packet_queue_run(sock->packet); @@ -150,7 +150,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde, */ static NTSTATUS sock_send_read(struct dcerpc_connection *p) { - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; sock->pending_reads++; if (sock->pending_reads == 1) { packet_recv_enable(sock->packet); @@ -164,7 +164,7 @@ static NTSTATUS sock_send_read(struct dcerpc_connection *p) static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, BOOL trigger_read) { - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; DATA_BLOB blob; NTSTATUS status; @@ -194,7 +194,7 @@ static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, */ static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p, NTSTATUS status) { - struct sock_private *sock = p->transport.private; + struct sock_private *sock = p->transport.private_data; if (sock && sock->sock) { sock_dead(p, status); @@ -208,7 +208,7 @@ static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p, NTSTATUS status) */ static const char *sock_peer_name(struct dcerpc_connection *p) { - struct sock_private *sock = talloc_get_type(p->transport.private, struct sock_private); + struct sock_private *sock = talloc_get_type(p->transport.private_data, struct sock_private); return sock->server_name; } @@ -217,7 +217,7 @@ static const char *sock_peer_name(struct dcerpc_connection *p) */ static const char *sock_target_hostname(struct dcerpc_connection *p) { - struct sock_private *sock = talloc_get_type(p->transport.private, struct sock_private); + struct sock_private *sock = talloc_get_type(p->transport.private_data, struct sock_private); return sock->server_name; } @@ -258,7 +258,7 @@ static void continue_socket_connect(struct composite_context *ctx) fill in the transport methods */ conn->transport.transport = s->transport; - conn->transport.private = NULL; + conn->transport.private_data = NULL; conn->transport.send_request = sock_send_request; conn->transport.send_read = sock_send_read; @@ -275,7 +275,7 @@ static void continue_socket_connect(struct composite_context *ctx) sock->fde = event_add_fd(conn->event_ctx, sock->sock, socket_get_fd(sock->sock), EVENT_FD_READ, sock_io_handler, conn); - conn->transport.private = sock; + conn->transport.private_data = sock; sock->packet = packet_init(sock); if (sock->packet == NULL) { diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index c3e104e78b..19ad8790a8 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -830,7 +830,7 @@ static void continue_epm_recv_binding(struct composite_context *ctx) */ static void continue_epm_map(struct rpc_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); struct epm_map_binding_state *s = talloc_get_type(c->private_data, struct epm_map_binding_state); -- cgit