transport->socket = talloc_reference(transport, sock);
}
transport->negotiate.protocol = PROTOCOL_NT1;
+ transport->ev = sock->event.ctx;
transport->options = *options;
transport->negotiate.max_xmit = transport->options.max_xmit;
/* this is the context for the client transport layer */
struct smbcli_transport {
+ struct tevent_context *ev; /* TODO: remove this !!! */
+
/* socket level info */
struct smbcli_socket *socket;
/* keep receiving packets until this one is replied to */
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;
}
}
c->private_data = state;
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 */
state->io_open = talloc_zero(c, union smb_open);
c->private_data = state;
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 */
state->io_open = talloc_zero(c, union smb_open);
if (c == NULL) goto failed;
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);
if (state == NULL) goto failed;
struct sesssetup_state *state;
NTSTATUS status;
- c = composite_create(session, session->transport->socket->event.ctx);
+ c = composite_create(session, session->transport->ev);
if (c == NULL) return NULL;
state = talloc_zero(c, struct sesssetup_state);
}
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) {
talloc_free(lsa);
return NT_STATUS_NO_MEMORY;