aboutsummaryrefslogtreecommitdiff
path: root/src/syslua/lx/mainloop.lua
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-05-03 18:48:31 +0200
committerAlex Auvolat <alex@adnab.me>2017-05-03 18:48:31 +0200
commit0b583122fb6cfcff991c54836d37cb3958c343b1 (patch)
tree6d576fb36d25af04f6deb788f46fcb1555b9104f /src/syslua/lx/mainloop.lua
parent1a4eecd6a685e727611bbc1ffec696daa50bbaea (diff)
downloadkogata-0b583122fb6cfcff991c54836d37cb3958c343b1.tar.gz
kogata-0b583122fb6cfcff991c54836d37cb3958c343b1.zip
Stuff ? (keyboard...)
Diffstat (limited to 'src/syslua/lx/mainloop.lua')
-rw-r--r--src/syslua/lx/mainloop.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/syslua/lx/mainloop.lua b/src/syslua/lx/mainloop.lua
index c2ae88d..b1b3feb 100644
--- a/src/syslua/lx/mainloop.lua
+++ b/src/syslua/lx/mainloop.lua
@@ -21,6 +21,7 @@ function new_fd(fd, error_cb)
function fd:expect(len, cb)
table.insert(self.rd_expect, {len, "", cb})
end
+ return fd
end
function mainloop.add_fd(fd, error_cb)
@@ -55,7 +56,7 @@ function mainloop.run()
local res = sys.select(sel_fds, -1)
assert(res, "select() call failed")
- for i, fd = pairs(fds) do
+ for i, fd in pairs(fds) do
local flags = sel_fds[i][3]
if flags & sysdef.SEL_ERROR ~= 0 then
fd.error_cb(fd)