diff options
author | Ralph Boehme <slow@samba.org> | 2018-10-28 02:04:51 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-11-02 21:21:13 +0100 |
commit | e7eec24d27b8694fd7626577a2aca05e99045964 (patch) | |
tree | 9acc5aeb392edd656e10333991b3237da030800d /libcli | |
parent | 94ad5ee662a5bfe1c79d8a9c3fcf51d0a1d652c7 (diff) | |
download | samba-e7eec24d27b8694fd7626577a2aca05e99045964.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>
Diffstat (limited to 'libcli')
-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 b7bf5796ba8..9edb6292777 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; } } |