]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:lib: Allow open_socket_out without a timeout
authorVolker Lendecke <vl@samba.org>
Tue, 27 Nov 2018 09:15:39 +0000 (10:15 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 26 Feb 2020 19:45:37 +0000 (19:45 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/util_sock.c

index e48cdb07ca9a5fdeac62544315bb43befad202ad..0b7029706a6a6928f75cbe745f12652881d1c2e7 100644 (file)
@@ -481,7 +481,8 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
 
        tevent_req_set_cleanup_fn(req, open_socket_out_cleanup);
 
-       if (!tevent_req_set_endtime(
+       if ((timeout != 0) &&
+           !tevent_req_set_endtime(
                    req, ev, timeval_current_ofs_msec(timeout))) {
                tevent_req_oom(req);
                return tevent_req_post(req, ev);