summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-30 13:45:53 -0700
committerJeremy Allison <jra@samba.org>2010-03-30 13:45:53 -0700
commitd447184ca863fd3effa2585a80704468572893b7 (patch)
treeec3fb13bb18195fb5d96a9ed4f033d0de4722d95
parent902a5e53cdcb1952a5fe6be072f91725a3e78608 (diff)
downloadsamba-d447184ca863fd3effa2585a80704468572893b7.tar.gz
samba-d447184ca863fd3effa2585a80704468572893b7.tar.bz2
samba-d447184ca863fd3effa2585a80704468572893b7.zip
If the timeout has been set to zero, don't register an end time.
The caller doesn't want a timeout. Jeremy.
-rw-r--r--source3/libsmb/async_smb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 2f1f45c0a6..4518518a43 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -424,9 +424,11 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx,
}
state->iov_count = iov_count + 3;
- endtime = timeval_current_ofs(0, cli->timeout * 1000);
- if (!tevent_req_set_endtime(result, ev, endtime)) {
- tevent_req_nomem(NULL, result);
+ if (cli->timeout) {
+ endtime = timeval_current_ofs(0, cli->timeout * 1000);
+ if (!tevent_req_set_endtime(result, ev, endtime)) {
+ tevent_req_nomem(NULL, result);
+ }
}
return result;
}