Jacek Caban : wininet: Pass timeout as DWORD in setsockopt calls.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 25 10:13:23 CDT 2015


Module: wine
Branch: master
Commit: b720e42fcfbf148f9d2d0606549a805745fbc90c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b720e42fcfbf148f9d2d0606549a805745fbc90c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Mar 25 13:10:14 2015 +0100

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 a268aa7..9f64cb9 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");




More information about the wine-cvs mailing list