wininet: Moved connected check out of NETCON_set_timeout.

This commit is contained in:
Jacek Caban 2011-05-04 11:47:32 +00:00 committed by Alexandre Julliard
parent 0a51b005d3
commit 4c1c5fe64c
2 changed files with 5 additions and 5 deletions

View File

@ -1995,6 +1995,11 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer,
if (size != sizeof(DWORD))
return ERROR_INVALID_PARAMETER;
if(NETCON_connected(&req->netConnection)) {
FIXME("unsupported without active connection\n");
return ERROR_SUCCESS;
}
return NETCON_set_timeout(&req->netConnection, option == INTERNET_OPTION_SEND_TIMEOUT,
*(DWORD*)buffer);

View File

@ -896,11 +896,6 @@ DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, int value)
int result;
struct timeval tv;
/* FIXME: we should probably store the timeout in the connection to set
* when we do connect */
if (!NETCON_connected(connection))
return ERROR_SUCCESS;
/* value is in milliseconds, convert to struct timeval */
tv.tv_sec = value / 1000;
tv.tv_usec = (value % 1000) * 1000;