mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:smb2cli: pass timeout to smb2cli_req_create/send()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Sep 18 07:04:05 CEST 2011 on sn-devel-104
This commit is contained in:
parent
271f78a9bb
commit
5f237763f8
@ -178,6 +178,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
|
||||
uint16_t cmd,
|
||||
uint32_t additional_flags,
|
||||
uint32_t clear_flags,
|
||||
unsigned int timeout,
|
||||
uint32_t pid,
|
||||
uint32_t tid,
|
||||
uint64_t uid,
|
||||
@ -223,6 +224,15 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
|
||||
SIVAL(state->hdr, SMB2_HDR_TID, tid);
|
||||
SBVAL(state->hdr, SMB2_HDR_SESSION_ID, uid);
|
||||
|
||||
if (timeout > 0) {
|
||||
struct timeval endtime;
|
||||
|
||||
endtime = timeval_current_ofs_msec(timeout);
|
||||
if (!tevent_req_set_endtime(req, ev, endtime)) {
|
||||
return req;
|
||||
}
|
||||
}
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
@ -333,6 +343,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
|
||||
uint16_t cmd,
|
||||
uint32_t additional_flags,
|
||||
uint32_t clear_flags,
|
||||
unsigned int timeout,
|
||||
uint32_t pid,
|
||||
uint32_t tid,
|
||||
uint64_t uid,
|
||||
@ -346,6 +357,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
req = smb2cli_req_create(mem_ctx, ev, cli, cmd,
|
||||
additional_flags, clear_flags,
|
||||
timeout,
|
||||
pid, tid, uid,
|
||||
fixed, fixed_len, dyn, dyn_len);
|
||||
if (req == NULL) {
|
||||
|
@ -26,6 +26,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
|
||||
uint16_t cmd,
|
||||
uint32_t additional_flags,
|
||||
uint32_t clear_flags,
|
||||
unsigned int timeout,
|
||||
uint32_t pid,
|
||||
uint32_t tid,
|
||||
uint64_t uid,
|
||||
@ -47,6 +48,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
|
||||
uint16_t cmd,
|
||||
uint32_t additional_flags,
|
||||
uint32_t clear_flags,
|
||||
unsigned int timeout,
|
||||
uint32_t pid,
|
||||
uint32_t tid,
|
||||
uint64_t uid,
|
||||
|
@ -55,6 +55,7 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CLOSE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -138,6 +138,7 @@ struct tevent_req *smb2cli_create_send(
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CREATE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -53,6 +53,7 @@ struct tevent_req *smb2cli_flush_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FLUSH,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -68,6 +68,7 @@ struct tevent_req *smb2cli_negprot_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_NEGPROT,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
0, 0, /* tid, uid */
|
||||
state->fixed, sizeof(state->fixed),
|
||||
|
@ -88,6 +88,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -67,6 +67,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_READ,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -75,6 +75,7 @@ static struct tevent_req *smb2cli_sesssetup_blob_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_SESSSETUP,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
0, /* tid */
|
||||
cli->smb2.uid,
|
||||
@ -355,6 +356,7 @@ struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_LOGOFF,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
0, /* tid */
|
||||
cli->smb2.uid,
|
||||
|
@ -83,6 +83,7 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TCON,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
0, /* tid */
|
||||
cli->smb2.uid,
|
||||
@ -190,6 +191,7 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TDIS,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
@ -76,6 +76,7 @@ struct tevent_req *smb2cli_write_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_WRITE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
cli->smb2.tid,
|
||||
cli->smb2.uid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user