From: Volker Lendecke Date: Tue, 27 Nov 2018 09:15:39 +0000 (+0100) Subject: s3:lib: Allow open_socket_out without a timeout X-Git-Tag: ldb-2.2.0~1581 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a7480d6124e39dcf99c67e602e0c2837e22d438;p=thirdparty%2Fsamba.git s3:lib: Allow open_socket_out without a timeout Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index e48cdb07ca9..0b7029706a6 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -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);