1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

s4:libcli/raw: add transport->ev as copy of transport->socket->event.ctx

We'll remove transport->socket soon, but removing transport->ev
will take a bit longer.

metze
This commit is contained in:
Stefan Metzmacher 2011-11-22 09:36:30 +01:00
parent 511dc9358d
commit b3d3395e01
8 changed files with 9 additions and 6 deletions

View File

@ -88,6 +88,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
transport->socket = talloc_reference(transport, sock); transport->socket = talloc_reference(transport, sock);
} }
transport->negotiate.protocol = PROTOCOL_NT1; transport->negotiate.protocol = PROTOCOL_NT1;
transport->ev = sock->event.ctx;
transport->options = *options; transport->options = *options;
transport->negotiate.max_xmit = transport->options.max_xmit; transport->negotiate.max_xmit = transport->options.max_xmit;

View File

@ -108,6 +108,8 @@ struct smbcli_options {
/* this is the context for the client transport layer */ /* this is the context for the client transport layer */
struct smbcli_transport { struct smbcli_transport {
struct tevent_context *ev; /* TODO: remove this !!! */
/* socket level info */ /* socket level info */
struct smbcli_socket *socket; struct smbcli_socket *socket;

View File

@ -358,7 +358,7 @@ bool smbcli_request_receive(struct smbcli_request *req)
/* keep receiving packets until this one is replied to */ /* keep receiving packets until this one is replied to */
while (req->state <= SMBCLI_REQUEST_RECV) { while (req->state <= SMBCLI_REQUEST_RECV) {
if (tevent_loop_once(req->transport->socket->event.ctx) != 0) { if (tevent_loop_once(req->transport->ev) != 0) {
return false; return false;
} }
} }

View File

@ -247,7 +247,7 @@ struct composite_context *smb_composite_appendacl_send(struct smbcli_tree *tree,
c->private_data = state; c->private_data = state;
c->state = COMPOSITE_STATE_IN_PROGRESS; c->state = COMPOSITE_STATE_IN_PROGRESS;
c->event_ctx = tree->session->transport->socket->event.ctx; c->event_ctx = tree->session->transport->ev;
/* setup structures for opening file */ /* setup structures for opening file */
state->io_open = talloc_zero(c, union smb_open); state->io_open = talloc_zero(c, union smb_open);

View File

@ -229,7 +229,7 @@ struct composite_context *smb_composite_loadfile_send(struct smbcli_tree *tree,
c->private_data = state; c->private_data = state;
c->state = COMPOSITE_STATE_IN_PROGRESS; c->state = COMPOSITE_STATE_IN_PROGRESS;
c->event_ctx = tree->session->transport->socket->event.ctx; c->event_ctx = tree->session->transport->ev;
/* setup for the open */ /* setup for the open */
state->io_open = talloc_zero(c, union smb_open); state->io_open = talloc_zero(c, union smb_open);

View File

@ -225,7 +225,7 @@ struct composite_context *smb_composite_savefile_send(struct smbcli_tree *tree,
if (c == NULL) goto failed; if (c == NULL) goto failed;
c->state = COMPOSITE_STATE_IN_PROGRESS; c->state = COMPOSITE_STATE_IN_PROGRESS;
c->event_ctx = tree->session->transport->socket->event.ctx; c->event_ctx = tree->session->transport->ev;
state = talloc(c, struct savefile_state); state = talloc(c, struct savefile_state);
if (state == NULL) goto failed; if (state == NULL) goto failed;

View File

@ -548,7 +548,7 @@ struct composite_context *smb_composite_sesssetup_send(struct smbcli_session *se
struct sesssetup_state *state; struct sesssetup_state *state;
NTSTATUS status; NTSTATUS status;
c = composite_create(session, session->transport->socket->event.ctx); c = composite_create(session, session->transport->ev);
if (c == NULL) return NULL; if (c == NULL) return NULL;
state = talloc_zero(c, struct sesssetup_state); state = talloc_zero(c, struct sesssetup_state);

View File

@ -79,7 +79,7 @@ static NTSTATUS smblsa_connect(struct smbcli_state *cli)
} }
lsa->ipc_tree->tid = tcon.tconx.out.tid; lsa->ipc_tree->tid = tcon.tconx.out.tid;
lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx); lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->ev);
if (lsa->pipe == NULL) { if (lsa->pipe == NULL) {
talloc_free(lsa); talloc_free(lsa);
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;