]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file changes not directly applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)
open-vm-tools/lib/poll/poll.c
open-vm-tools/lib/stubs/stub-config.c

index 6c762a101e5e3ec2339281dfd5ad870cfee0338d..da2db361dded4ed5c41b7e91174dd6085317db87 100644 (file)
@@ -42,6 +42,7 @@
    #include <winsock2.h>
    #include <ws2tcpip.h>
    #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 */
index a970db322ad7287cd19300556333c5079f502f7c..1ba1d4f7aef00ede3ef89634954a21e160ce8f5d 100644 (file)
@@ -117,3 +117,11 @@ Config_NotSet(const char *fmt, ...)
 {
    return FALSE;
 }
+
+int32
+Preference_GetLong(int32 defaultValue,
+                   const char *name)
+{
+   return defaultValue;
+}
+