diff options
author | Ralph Boehme <slow@samba.org> | 2018-10-28 02:04:51 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-11-06 09:10:22 +0100 |
commit | d79d7192bf27914d6d13863a2aab18beb3945bb2 (patch) | |
tree | 27a9f74b8fd5b521ca86d047bbc40c5273fcfcc1 /libcli/smb | |
parent | 23c1e018fc2e3343d7c46efae94bbe1702366d7c (diff) | |
download | samba-d79d7192bf27914d6d13863a2aab18beb3945bb2.tar.gz |
libcli: fill endtime if smbXcli_req_create() timeout is non-zero
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13667
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e7eec24d27b8694fd7626577a2aca05e99045964)
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index f4d4688bde6..389c272675d 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -1585,10 +1585,8 @@ struct tevent_req *smb1cli_req_create(TALLOC_CTX *mem_ctx, state->smb1.iov_count = iov_count + 4; if (timeout_msec > 0) { - struct timeval endtime; - - endtime = timeval_current_ofs_msec(timeout_msec); - if (!tevent_req_set_endtime(req, ev, endtime)) { + state->endtime = timeval_current_ofs_msec(timeout_msec); + if (!tevent_req_set_endtime(req, ev, state->endtime)) { return req; } } @@ -3051,10 +3049,8 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx, } if (timeout_msec > 0) { - struct timeval endtime; - - endtime = timeval_current_ofs_msec(timeout_msec); - if (!tevent_req_set_endtime(req, ev, endtime)) { + state->endtime = timeval_current_ofs_msec(timeout_msec); + if (!tevent_req_set_endtime(req, ev, state->endtime)) { return req; } } |