mirror of
https://github.com/RetroShare/libretroshare.git
synced 2026-09-14 11:05:45 +05:00
Merge pull request #8 from csoler/v0.6-TorControl
Fixes for FriendServer
This commit is contained in:
commit
68864cbd70
@ -476,6 +476,14 @@ int unix_getsockopt_error(int sockfd, int *err)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int rs_socket_error()
|
||||
{
|
||||
#ifdef WINDOWS_SYS // ie WINDOWS.
|
||||
return WinToUnixError(WSAGetLastError());
|
||||
#else
|
||||
return errno;
|
||||
#endif
|
||||
}
|
||||
/******************* WINDOWS SPECIFIC PART ******************/
|
||||
#ifdef WINDOWS_SYS // ie WINDOWS.
|
||||
|
||||
@ -490,7 +498,7 @@ int WinToUnixError(int error)
|
||||
return EINPROGRESS;
|
||||
break;
|
||||
case WSAEWOULDBLOCK:
|
||||
return EINPROGRESS;
|
||||
return EWOULDBLOCK;
|
||||
break;
|
||||
case WSAENETUNREACH:
|
||||
return ENETUNREACH;
|
||||
|
||||
@ -105,6 +105,8 @@ int unix_fcntl_nonblock(int sockfd);
|
||||
int unix_connect(int sockfd, const sockaddr_storage& serv_addr);
|
||||
int unix_getsockopt_error(int sockfd, int *err);
|
||||
|
||||
int rs_socket_error();
|
||||
|
||||
#ifdef WINDOWS_SYS // WINDOWS
|
||||
/******************* WINDOWS SPECIFIC PART ******************/
|
||||
RS_DEPRECATED_FOR("use std::error_condition instead")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user