diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-20 07:20:26 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-20 07:20:26 +0000 |
commit | f20f4889bfe5a02cd9b77868b90cc8042352176a (patch) | |
tree | 339e085e385190ea5f3a9246c3a790c45036c61c /src/options.c | |
parent | 087b4f865d861162eb32a4081bb7c2087688919a (diff) | |
download | luasocket-f20f4889bfe5a02cd9b77868b90cc8042352176a.tar.gz luasocket-f20f4889bfe5a02cd9b77868b90cc8042352176a.tar.bz2 luasocket-f20f4889bfe5a02cd9b77868b90cc8042352176a.zip |
Changed prefix of function names to match module names.
Removed some warnings and useless code.
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/options.c b/src/options.c index 0f1ca2c..a464a4b 100644 --- a/src/options.c +++ b/src/options.c | |||
@@ -80,12 +80,12 @@ int opt_linger(lua_State *L, p_socket ps) | |||
80 | lua_gettable(L, 3); | 80 | lua_gettable(L, 3); |
81 | if (!lua_isboolean(L, -1)) | 81 | if (!lua_isboolean(L, -1)) |
82 | luaL_argerror(L, 3, "boolean 'on' field expected"); | 82 | luaL_argerror(L, 3, "boolean 'on' field expected"); |
83 | li.l_onoff = lua_toboolean(L, -1); | 83 | li.l_onoff = (u_short) lua_toboolean(L, -1); |
84 | lua_pushstring(L, "timeout"); | 84 | lua_pushstring(L, "timeout"); |
85 | lua_gettable(L, 3); | 85 | lua_gettable(L, 3); |
86 | if (!lua_isnumber(L, -1)) | 86 | if (!lua_isnumber(L, -1)) |
87 | luaL_argerror(L, 3, "number 'timeout' field expected"); | 87 | luaL_argerror(L, 3, "number 'timeout' field expected"); |
88 | li.l_linger = (int) lua_tonumber(L, -1); | 88 | li.l_linger = (u_short) lua_tonumber(L, -1); |
89 | return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li)); | 89 | return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li)); |
90 | } | 90 | } |
91 | 91 | ||