diff options
author | Steven Barth <steven@midlink.org> | 2009-02-27 14:51:37 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-02-27 14:51:37 +0000 |
commit | 7196b2cd848577f640d9268a0a34ab3ad8706c26 (patch) | |
tree | 94b74ea2ba96fdc6135c6af807e925f064a2db28 /libs/nixio/src/sockopt.c | |
parent | 30421d38dd004a8c1e149e40af2019cbbc4c8bd6 (diff) |
nixio: Fixes, use POSIX calls for file i/o
httpclient: resume support, splice() support, cookie support
Diffstat (limited to 'libs/nixio/src/sockopt.c')
-rw-r--r-- | libs/nixio/src/sockopt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/nixio/src/sockopt.c b/libs/nixio/src/sockopt.c index c92254e884..68a4c5590e 100644 --- a/libs/nixio/src/sockopt.c +++ b/libs/nixio/src/sockopt.c @@ -30,6 +30,7 @@ */ static int nixio_sock_setblocking(lua_State *L) { int fd = nixio__checkfd(L, 1); + luaL_checkany(L, 2); int set = lua_toboolean(L, 2); int flags = fcntl(fd, F_GETFL); @@ -37,7 +38,7 @@ static int nixio_sock_setblocking(lua_State *L) { return nixio__perror(L); } - if (set) { + if (!set) { flags |= O_NONBLOCK; } else { flags &= ~O_NONBLOCK; |