aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2013-08-16 00:35:28 +0300
committerLee Salzman <[email protected]>2013-08-16 00:35:28 +0300
commit3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb (patch)
treeacdf37afe14dcc7d1627e72d8e1fc7306e41111d /unix.c
parente123218df3e638b138a2024b24a2607c9583a797 (diff)
downloadenet-3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb.tar.gz
enet-3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb.zip
ENET_SOCKOPT_ERROR fix
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;