summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-11-22 22:25:06 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-11-22 22:25:06 +0000
commit8e3ffe3dab383df7c2307a8fc55e0d856fd3a252 (patch)
tree498125f987fb6364983648190ccc1621008585c6
parentkill now supports numbers and not only strings (diff)
mainloop now handles all return codes for writer as well
git-svn-id: https://svn.spreadspace.org/gcsd/trunk@55 ac14a137-c7f1-4531-abe0-07747231d213
-rw-r--r--src/main_loop.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main_loop.lua b/src/main_loop.lua
index 9b9d535..3211660 100644
--- a/src/main_loop.lua
+++ b/src/main_loop.lua
@@ -118,7 +118,14 @@ function main_loop(opt)
end
for _, writer in ipairs(writeable) do
ret = writer:write()
- if(ret == defines.KILL_CLIENT) then
+ if(ret == defines.KILL_DAEMON) then
+ return_value = 2
+ break
+ elseif(ret == defines.KILL_MODULE_CLASS) then
+ module_list:unregister_by_class(writer.client_instance.module_instance.class)
+ elseif(ret == defines.KILL_MODULE) then
+ module_list:unregister(writer.client_instance.module_instance)
+ elseif(ret == defines.KILL_CLIENT) then
client_list:unregister(writer.client_instance)
end
end