LuCId fixes
authorSteven Barth <steven@midlink.org>
Wed, 27 May 2009 13:20:35 +0000 (13:20 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 27 May 2009 13:20:35 +0000 (13:20 +0000)
libs/lucid/luasrc/lucid.lua
libs/lucid/root/etc/config/lucid
libs/lucid/root/etc/init.d/lucid

index d72bf25..34452a5 100644 (file)
@@ -176,7 +176,7 @@ end
 
 function create_process(threadcb, waitcb)
        local threadlimit = tonumber(cursor:get(UCINAME, "main", "threadlimit"))
-       if threadlimit and #tpids >= tcount then
+       if threadlimit and tcount >= threadlimit then
                nixio.syslog("warning", "Unable to create thread: process limit reached")
                return nil
        end
index bfbb4ca..7baf6db 100644 (file)
@@ -1,7 +1,7 @@
 config lucid main
        option pollinterval 15000
        option threadlimit 25
-       option daemon 1
+       option daemonize 1
        option debug 0
        list supports tcpserver
        list supports server
index 125dc7b..1b2b04e 100755 (executable)
@@ -9,13 +9,13 @@ set -e
 
 start() {
        echo -n "Starting $DESC: $NAME"
-       lua -e 'require "luci.lucid".start()'
+       lua -lluci.lucid -e 'luci.lucid.start()'
        echo "."
 }
 
 stop() {
        echo -n "Stopping $DESC: $NAME"
-       lua -e 'require "luci.lucid".stop()'
+       lua -lluci.lucid -e 'luci.lucid.stop()'
        echo "."
 }