wininet: Directly return error status from NETCON_close.
This commit is contained in:
parent
36cb1ef3d3
commit
c55d0a8516
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue