diff options
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/options.c b/src/options.c index 281a00f..801adf9 100644 --- a/src/options.c +++ b/src/options.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include "auxiliar.h" | 11 | #include "auxiliar.h" |
12 | #include "options.h" | 12 | #include "options.h" |
13 | #include "inet.h" | 13 | #include "inet.h" |
14 | #include "lua_typeerror.h" | ||
14 | 15 | ||
15 | /*=========================================================================*\ | 16 | /*=========================================================================*\ |
16 | * Internal functions prototypes | 17 | * Internal functions prototypes |
@@ -99,7 +100,7 @@ int opt_get_ip_multicast_loop(lua_State *L, p_socket ps) | |||
99 | int opt_set_linger(lua_State *L, p_socket ps) | 100 | int opt_set_linger(lua_State *L, p_socket ps) |
100 | { | 101 | { |
101 | struct linger li; /* obj, name, table */ | 102 | struct linger li; /* obj, name, table */ |
102 | if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE)); | 103 | if (!lua_istable(L, 3)) luaL_typeerror(L, 3, lua_typename(L, LUA_TTABLE)); |
103 | lua_pushstring(L, "on"); | 104 | lua_pushstring(L, "on"); |
104 | lua_gettable(L, 3); | 105 | lua_gettable(L, 3); |
105 | if (!lua_isboolean(L, -1)) | 106 | if (!lua_isboolean(L, -1)) |
@@ -165,7 +166,7 @@ int opt_set_ip6_v6only(lua_State *L, p_socket ps) | |||
165 | static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) | 166 | static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) |
166 | { | 167 | { |
167 | struct ip_mreq val; /* obj, name, table */ | 168 | struct ip_mreq val; /* obj, name, table */ |
168 | if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE)); | 169 | if (!lua_istable(L, 3)) luaL_typeerror(L, 3, lua_typename(L, LUA_TTABLE)); |
169 | lua_pushstring(L, "multiaddr"); | 170 | lua_pushstring(L, "multiaddr"); |
170 | lua_gettable(L, 3); | 171 | lua_gettable(L, 3); |
171 | if (!lua_isstring(L, -1)) | 172 | if (!lua_isstring(L, -1)) |