From b2b7e9cef1bbe70018505cd4bc222058d7e6f106 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Fri, 2 Jul 2004 18:58:23 +0000 Subject: [PATCH] tiny bug in test. --- src/usocket.c | 6 ------ test/testclnt.lua | 13 ++++++++----- test/testsrvr.lua | 1 - 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/usocket.c b/src/usocket.c index 0e3d30c..4e73a96 100644 --- a/src/usocket.c +++ b/src/usocket.c @@ -17,12 +17,6 @@ * Initializes module \*-------------------------------------------------------------------------*/ int sock_open(void) { -#if DOESNT_COMPILE_TRY_THIS - struct sigaction ignore; - memset(&ignore, 0, sizeof(ignore)); - ignore.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &ignore, NULL); -#endif /* instals a handler to ignore sigpipe or it will crash us */ signal(SIGPIPE, SIG_IGN); return 1; diff --git a/test/testclnt.lua b/test/testclnt.lua index cdd2c08..ffe487f 100644 --- a/test/testclnt.lua +++ b/test/testclnt.lua @@ -447,11 +447,14 @@ function getstats_test() str = data:receive(%d) data:send(str) ]], c)) - c:send(string.rep("a", c)) - c:receive(c) - local r, s, a = c:getstats() - assert(r == t, "received count failed") - assert(s == t, "sent count failed") + data:send(string.rep("a", c)) + data:receive(c) + t = t + c + local r, s, a = data:getstats() + assert(r == t, "received count failed" .. tostring(r) + .. "/" .. tostring(t)) + assert(s == t, "sent count failed" .. tostring(s) + .. "/" .. tostring(t)) end print("ok") end diff --git a/test/testsrvr.lua b/test/testsrvr.lua index 5b842f1..969f95b 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua @@ -24,7 +24,6 @@ while 1 do print("server: closing connection...") break end - print(command); (loadstring(command))() end end