diff options
-rw-r--r-- | FIX | 1 | ||||
-rw-r--r-- | src/udp.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -9,3 +9,4 @@ check all "require("http")" etc in the manual. | |||
9 | make sure sock_gethostname.* only return success if the hp is not null! | 9 | make sure sock_gethostname.* only return success if the hp is not null! |
10 | change 'l' prefix in C libraries to 'l-something'... | 10 | change 'l' prefix in C libraries to 'l-something'... |
11 | don't forget the declarations in luasocket.h and mime.h!!! | 11 | don't forget the declarations in luasocket.h and mime.h!!! |
12 | setpeername was using udp{unconnected} | ||
@@ -262,7 +262,7 @@ static int meth_settimeout(lua_State *L) { | |||
262 | * Turns a master udp object into a client object. | 262 | * Turns a master udp object into a client object. |
263 | \*-------------------------------------------------------------------------*/ | 263 | \*-------------------------------------------------------------------------*/ |
264 | static int meth_setpeername(lua_State *L) { | 264 | static int meth_setpeername(lua_State *L) { |
265 | p_udp udp = (p_udp) aux_checkclass(L, "udp{unconnected}", 1); | 265 | p_udp udp = (p_udp) aux_checkgroup(L, "udp{any}", 1); |
266 | p_tm tm = &udp->tm; | 266 | p_tm tm = &udp->tm; |
267 | const char *address = luaL_checkstring(L, 2); | 267 | const char *address = luaL_checkstring(L, 2); |
268 | int connecting = strcmp(address, "*"); | 268 | int connecting = strcmp(address, "*"); |