summaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix.c b/unix.c
index cfd212e..19585d3 100644
--- a/unix.c
+++ b/unix.c
@@ -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;