From: Oliver Kurth Date: Tue, 26 May 2020 22:32:57 +0000 (-0700) Subject: Common source file changes not directly applicable to open-vm-tools. X-Git-Tag: stable-11.2.0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c1c6743f5b1a2c9bf6d86f2eaacd10f2102aa2;p=thirdparty%2Fopen-vm-tools.git Common source file changes not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/poll/poll.c b/open-vm-tools/lib/poll/poll.c index 6c762a101..da2db361d 100644 --- a/open-vm-tools/lib/poll/poll.c +++ b/open-vm-tools/lib/poll/poll.c @@ -42,6 +42,7 @@ #include #include #include "err.h" + #include "preference.h" #endif /* @@ -501,7 +502,9 @@ PollSocketPairConnect(Bool blocking, // IN: blocking socket? if (connect(*s, addr, addrlen) == SOCKET_ERROR) { WSAPOLLFD pollFds[1]; - unsigned int timeout = 3 * 1000; /* wait 3 seconds */ + /* wait timeout seconds */ + unsigned int timeout = Preference_GetLong(3, + "pref.wsa.socket.pair.connect.timeout.seconds") * 1000; int ret = WSAGetLastError(); if (ret != WSAEWOULDBLOCK) { /* connection failed */ diff --git a/open-vm-tools/lib/stubs/stub-config.c b/open-vm-tools/lib/stubs/stub-config.c index a970db322..1ba1d4f7a 100644 --- a/open-vm-tools/lib/stubs/stub-config.c +++ b/open-vm-tools/lib/stubs/stub-config.c @@ -117,3 +117,11 @@ Config_NotSet(const char *fmt, ...) { return FALSE; } + +int32 +Preference_GetLong(int32 defaultValue, + const char *name) +{ + return defaultValue; +} +