From b720e42fcfbf148f9d2d0606549a805745fbc90c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 25 Mar 2015 13:10:14 +0100 Subject: [PATCH] wininet: Pass timeout as DWORD in setsockopt calls. --- dlls/wininet/netconnection.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index a268aa7a356..9f64cb9e638 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -949,22 +949,10 @@ int NETCON_GetCipherStrength(netconn_t *connection) DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) { int result; - struct timeval tv; - /* value is in milliseconds, convert to struct timeval */ - if (value == INFINITE) - { - tv.tv_sec = 0; - tv.tv_usec = 0; - } - else - { - tv.tv_sec = value / 1000; - tv.tv_usec = (value % 1000) * 1000; - } result = setsockopt(connection->socket, SOL_SOCKET, - send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv, - sizeof(tv)); + send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&value, + sizeof(value)); if (result == -1) { WARN("setsockopt failed\n");