diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-17 19:56:50 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-18 07:04:05 +0200 |
commit | 5f237763f89ce13240a6e47dddc4dff60e26fa7f (patch) | |
tree | b93f1f6f47b4e3d254a3b008b74e4ebd538c9f0b /source3/libsmb/smb2cli_base.c | |
parent | 271f78a9bb814ed10bcc8883a60d6609e1eef500 (diff) | |
download | samba-5f237763f89ce13240a6e47dddc4dff60e26fa7f.tar.gz samba-5f237763f89ce13240a6e47dddc4dff60e26fa7f.tar.bz2 samba-5f237763f89ce13240a6e47dddc4dff60e26fa7f.zip |
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
Diffstat (limited to 'source3/libsmb/smb2cli_base.c')
-rw-r--r-- | source3/libsmb/smb2cli_base.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index def7f57d45..f8b2f6e5df 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -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) { |