From: Stefan Metzmacher Date: Fri, 22 Jul 2011 06:41:20 +0000 (+0200) Subject: s3:libsmb: move cli_state->outgoing to cli_state->conn.outgoing X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=a11cc880ef0a7e105c46b835fb3c793da7cabb53;p=metze%2Fsamba%2Fwip.git s3:libsmb: move cli_state->outgoing to cli_state->conn.outgoing metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Fri Jul 22 09:53:59 CEST 2011 on sn-devel-104 --- diff --git a/source3/include/client.h b/source3/include/client.h index 72bb25a2d7ec..26b8fcb40567 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -124,9 +124,8 @@ struct cli_state { /* Where (if anywhere) this is mounted under DFS. */ char *dfs_mountpoint; - struct tevent_queue *outgoing; - struct { + struct tevent_queue *outgoing; struct tevent_req **pending; } conn; diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 402abb2c333c..462a6dc4a46c 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -430,7 +430,7 @@ static NTSTATUS cli_smb_req_iov_send(struct tevent_req *req, iov[0].iov_len = talloc_get_size(buf); iov_count = 1; } - subreq = writev_send(state, state->ev, state->cli->outgoing, + subreq = writev_send(state, state->ev, state->cli->conn.outgoing, state->cli->fd, false, iov, iov_count); if (subreq == NULL) { return NT_STATUS_NO_MEMORY; @@ -954,7 +954,7 @@ NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs) bool cli_has_async_calls(struct cli_state *cli) { - return ((tevent_queue_length(cli->outgoing) != 0) + return ((tevent_queue_length(cli->conn.outgoing) != 0) || (talloc_array_length(cli->conn.pending) != 0)); } diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index b84b1812e824..c394197ad9ea 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -233,8 +233,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, goto error; } - cli->outgoing = tevent_queue_create(cli, "cli_outgoing"); - if (cli->outgoing == NULL) { + cli->conn.outgoing = tevent_queue_create(cli, "cli_outgoing"); + if (cli->conn.outgoing == NULL) { goto error; } cli->conn.pending = NULL; diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index 037127ea07be..a1ecfb4e3892 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -293,7 +293,7 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, iov[0].iov_base = state->nbt; iov[0].iov_len = sizeof(state->nbt); - subreq = writev_send(state, state->ev, state->cli->outgoing, + subreq = writev_send(state, state->ev, state->cli->conn.outgoing, state->cli->fd, false, iov, num_iov); if (subreq == NULL) { return NT_STATUS_NO_MEMORY;