1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

If the timeout has been set to zero, don't register an end time.

The caller doesn't want a timeout.

Jeremy.
This commit is contained in:
Jeremy Allison 2010-03-30 13:45:53 -07:00
parent 902a5e53cd
commit d447184ca8

View File

@ -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;
}