wininet: Moved connected check out of NETCON_set_timeout.
This commit is contained in:
parent
0a51b005d3
commit
4c1c5fe64c
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user