From 5e75dc0857625fb9061660e07732e0f833e4a125 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Wed, 13 Apr 2005 22:18:21 +0000 Subject: [PATCH] Wrong class... --- FIX | 1 + src/udp.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/FIX b/FIX index cd6b27b..ed769d5 100644 --- a/FIX +++ b/FIX @@ -9,3 +9,4 @@ check all "require("http")" etc in the manual. make sure sock_gethostname.* only return success if the hp is not null! change 'l' prefix in C libraries to 'l-something'... don't forget the declarations in luasocket.h and mime.h!!! +setpeername was using udp{unconnected} diff --git a/src/udp.c b/src/udp.c index 7a60080..094e137 100644 --- a/src/udp.c +++ b/src/udp.c @@ -262,7 +262,7 @@ static int meth_settimeout(lua_State *L) { * Turns a master udp object into a client object. \*-------------------------------------------------------------------------*/ static int meth_setpeername(lua_State *L) { - p_udp udp = (p_udp) aux_checkclass(L, "udp{unconnected}", 1); + p_udp udp = (p_udp) aux_checkgroup(L, "udp{any}", 1); p_tm tm = &udp->tm; const char *address = luaL_checkstring(L, 2); int connecting = strcmp(address, "*");