diff options
author | Luk Claes <luk@debian.org> | 2012-05-10 18:30:25 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-12 00:43:53 +0200 |
commit | 14473f37f5a3cd4749f5c4f937fef37cc5ea8c47 (patch) | |
tree | 940c38236d6810374f38909d715cc0893fa0ed77 /source3/libsmb/smb2cli_read.c | |
parent | 0048dd95cda1f80bbf3bac9bf50d1cc129681f49 (diff) | |
download | samba-14473f37f5a3cd4749f5c4f937fef37cc5ea8c47.tar.gz samba-14473f37f5a3cd4749f5c4f937fef37cc5ea8c47.tar.bz2 samba-14473f37f5a3cd4749f5c4f937fef37cc5ea8c47.zip |
s3-libsmb: Generalise cli_state in smb2 read calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb/smb2cli_read.c')
-rw-r--r-- | source3/libsmb/smb2cli_read.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source3/libsmb/smb2cli_read.c b/source3/libsmb/smb2cli_read.c index d01e33f42d..8f3362a4ab 100644 --- a/source3/libsmb/smb2cli_read.c +++ b/source3/libsmb/smb2cli_read.c @@ -37,7 +37,10 @@ static void smb2cli_read_done(struct tevent_req *subreq); struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct cli_state *cli, + struct smbXcli_conn *conn, + uint32_t timeout_msec, + struct smbXcli_session *session, + uint32_t tcon_id, uint32_t length, uint64_t offset, uint64_t fid_persistent, @@ -65,12 +68,12 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, SBVAL(fixed, 32, minimum_count); SBVAL(fixed, 40, remaining_bytes); - subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_READ, + subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_READ, 0, 0, /* flags */ - cli->timeout, - cli->smb2.pid, - cli->smb2.tid, - cli->smb2.session, + timeout_msec, + 0xFEFF, /* pid */ + tcon_id, + session, state->fixed, sizeof(state->fixed), state->dyn_pad, sizeof(state->dyn_pad)); if (tevent_req_nomem(subreq, req)) { @@ -138,7 +141,10 @@ NTSTATUS smb2cli_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -NTSTATUS smb2cli_read(struct cli_state *cli, +NTSTATUS smb2cli_read(struct smbXcli_conn *conn, + uint32_t timeout_msec, + struct smbXcli_session *session, + uint32_t tcon_id, uint32_t length, uint64_t offset, uint64_t fid_persistent, @@ -154,7 +160,7 @@ NTSTATUS smb2cli_read(struct cli_state *cli, struct tevent_req *req; NTSTATUS status = NT_STATUS_NO_MEMORY; - if (cli_has_async_calls(cli)) { + if (smbXcli_conn_has_async_calls(conn)) { /* * Can't use sync call while an async call is in flight */ @@ -165,7 +171,9 @@ NTSTATUS smb2cli_read(struct cli_state *cli, if (ev == NULL) { goto fail; } - req = smb2cli_read_send(frame, ev, cli, length, offset, + req = smb2cli_read_send(frame, ev, + conn, timeout_msec, session, tcon_id, + length, offset, fid_persistent, fid_volatile, minimum_count, remaining_bytes); if (req == NULL) { |