Bug feioso no UDP e possivelmente no TCP também.

This commit is contained in:
Diego Nehab 2004-05-28 07:24:43 +00:00
parent 9297b074d5
commit c98dc99199
14 changed files with 59 additions and 50 deletions

View file

@ -4,6 +4,8 @@
-- Author: Diego Nehab
-- RCS ID: $Id$
-----------------------------------------------------------------------------
require"luasocket"
function get_status(sock, valid)
local line, err = sock:receive()
local code, par
@ -12,7 +14,7 @@ function get_status(sock, valid)
code = tonumber(code)
if code ~= valid then return code end
if code == 150 then
par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)"))
par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)")))
end
return nil, par
end