aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32.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 /win32.c
parente123218df3e638b138a2024b24a2607c9583a797 (diff)
downloadenet-3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb.tar.gz
enet-3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb.zip
ENET_SOCKOPT_ERROR fix
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32.c b/win32.c
index 1950da9..13d9314 100644
--- a/win32.c
+++ b/win32.c
@@ -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;