Commit b720e42f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Pass timeout as DWORD in setsockopt calls.

parent 9fc48b28
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment