Merge pull request #3 from d3m3vilurr/fix-vita-error-code

vita: No more use self defined net error code
This commit is contained in:
Cameron Gutman
2019-02-17 09:49:11 -08:00
committed by GitHub
+3 -5
View File
@@ -25,8 +25,6 @@ int sceClibPrintf(const char *fmt, ...);
#define SOMAXCONN 128
#define MSG_NOSIGNAL 0
#define EEINPROGRESS (SCE_NET_ERROR_EINPROGRESS & 0xFF)
#define EEWOULDBLOCK (SCE_NET_ERROR_EWOULDBLOCK & 0xFF)
static enet_uint32 timeBase = 0;
@@ -249,7 +247,7 @@ enet_socket_connect (ENetSocket socket, const ENetAddress * address)
result = connect (socket, (struct sockaddr *) & address -> address, address -> addressLength);
if (result < 0) {
if (errno == EEINPROGRESS)
if (errno == EINPROGRESS)
return 0;
result = -1;
}
@@ -312,7 +310,7 @@ enet_socket_send (ENetSocket socket,
sentLength = sendmsg (socket, & msgHdr, MSG_NOSIGNAL);
if (sentLength < 0) {
if (errno == EEWOULDBLOCK)
if (errno == EWOULDBLOCK)
return 0;
sceClibPrintf("enet_socket_send failed! socket 0x%x error 0x%x\n", socket, sentLength);
@@ -348,7 +346,7 @@ enet_socket_receive (ENetSocket socket,
recvLength = recvmsg (socket, & msgHdr, MSG_NOSIGNAL);
if (recvLength < 0) {
if (errno == EEWOULDBLOCK)
if (errno == EWOULDBLOCK)
return 0;
sceClibPrintf("enet_socket_receive failed! socket 0x%x recvLength 0x%x\n", socket, recvLength);