From 09e29486aebe758263365fc328aab8c6470b6bd2 Mon Sep 17 00:00:00 2001 From: Marcus Meissner <meissner@suse.de> Date: Wed, 26 Jan 2011 17:01:09 +0100 Subject: [PATCH] ws2_32: Implemented SO_CONNECT_TIME stub. --- dlls/ws2_32/socket.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 774481daa9e..f3a521c63b4 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2536,6 +2536,20 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, return ret; } + case WS_SO_CONNECT_TIME: + { + static int pretendtime = 0; + + if (!pretendtime) FIXME("WS_SO_CONNECT_TIME - faking results\n"); + if (!optlen || *optlen < sizeof(DWORD) || !optval) + { + SetLastError(WSAEFAULT); + return SOCKET_ERROR; + } + *(DWORD*)optval = pretendtime++; + *optlen = sizeof(DWORD); + return ret; + } /* As mentioned in setsockopt, Windows ignores this, so we * always return true here */ case WS_SO_DONTROUTE: -- 2.24.1