ENET_SOCKOPT_ERROR fix

This commit is contained in:
Lee Salzman
2013-08-16 00:35:28 +03:00
parent e123218df3
commit 3595c0b3fb
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -278,7 +278,10 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value)
switch (option)
{
case ENET_SOCKOPT_ERROR:
result = setsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
break;
default:
break;
}
return result == -1 ? -1 : 0;
+4 -1
View File
@@ -208,7 +208,10 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value)
switch (option)
{
case ENET_SOCKOPT_ERROR:
result = setsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
break;
default:
break;
}
return result == SOCKET_ERROR ? -1 : 0;