From 167727be3cefb3f45a26b0b1d96dc94a900a84b4 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 30 Jun 2003 06:10:02 +0000 Subject: Bug in usocket_recv... --- src/auxiliar.c | 5 +++++ src/inet.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/auxiliar.c b/src/auxiliar.c index 8b2fa37..65425c5 100644 --- a/src/auxiliar.c +++ b/src/auxiliar.c @@ -25,6 +25,11 @@ void aux_open(lua_State *L) lua_pushnumber(L, 1); lua_rawset(L, -3); #endif + /* make version string available so scripts */ + lua_pushstring(L, "version"); + lua_pushstring(L, LUASOCKET_VERSION); + lua_rawset(L, -3); + /* store namespace as global */ lua_settable(L, LUA_GLOBALSINDEX); /* make sure modules know what is our namespace */ lua_pushstring(L, "LUASOCKET_LIBNAME"); diff --git a/src/inet.c b/src/inet.c index 312a45b..574399c 100644 --- a/src/inet.c +++ b/src/inet.c @@ -177,7 +177,6 @@ const char *inet_tryconnect(p_sock ps, const char *address, if (!strlen(address) || !inet_aton(address, &remote.sin_addr)) { struct hostent *hp = gethostbyname(address); struct in_addr **addr; - remote.sin_family = AF_INET; if (!hp) return sock_hoststrerror(); addr = (struct in_addr **) hp->h_addr_list; memcpy(&remote.sin_addr, *addr, sizeof(struct in_addr)); -- cgit v1.2.3-55-g6feb