diff options
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |