From 5874d47f550a2f278ca35ccda96d49ccf0ca7e36 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Tue, 14 Jun 2011 20:30:40 +0200 Subject: [PATCH] dns.getaddrinfo: Return proper error messages --- src/inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inet.c b/src/inet.c index 758dbf8..962acec 100644 --- a/src/inet.c +++ b/src/inet.c @@ -109,7 +109,7 @@ static int inet_global_getaddrinfo(lua_State *L) ret = getaddrinfo(hostname, NULL, &hints, &resolved); if (ret != 0) { lua_pushnil(L); - lua_pushstring(L, "getaddrinfo returned error"); + lua_pushstring(L, socket_gaistrerror(ret)); return 2; } lua_newtable(L);