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

wininet: Directly return error status from NETCON_close.

parent 36cb1ef3
......@@ -432,7 +432,7 @@ BOOL NETCON_init(WININET_NETCONNECTION *connnection, BOOL useSSL);
void NETCON_unload(void);
DWORD NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol);
BOOL NETCON_close(WININET_NETCONNECTION *connection);
DWORD NETCON_close(WININET_NETCONNECTION *connection);
DWORD NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr,
unsigned int addrlen);
DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname);
......
......@@ -404,11 +404,11 @@ DWORD NETCON_create(WININET_NETCONNECTION *connection, int domain,
* NETCON_close
* Basically calls 'close()' unless we should use SSL
*/
BOOL NETCON_close(WININET_NETCONNECTION *connection)
DWORD NETCON_close(WININET_NETCONNECTION *connection)
{
int result;
if (!NETCON_connected(connection)) return FALSE;
if (!NETCON_connected(connection)) return ERROR_SUCCESS;
#ifdef SONAME_LIBSSL
if (connection->useSSL)
......@@ -425,11 +425,8 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
connection->socketFD = -1;
if (result == -1)
{
INTERNET_SetLastError(sock_get_error(errno));
return FALSE;
}
return TRUE;
return sock_get_error(errno);
return ERROR_SUCCESS;
}
#ifdef SONAME_LIBSSL
static BOOL check_hostname(X509 *cert, char *hostname)
......
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