diff options
author | Steven Barth <steven@midlink.org> | 2008-07-23 18:52:12 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-07-23 18:52:12 +0000 |
commit | 22451345d859bdae5a8cc18464459e3a18406cb1 (patch) | |
tree | 6f4c0ca6e185f4501067a9cdb01d463ef5f88d3e /libs/sgi-wsapi/luasrc/sgi/wsapi.lua | |
parent | 59bef00fc3a9019733103661e67268f55c93ae17 (diff) |
Made SGIs even more standards compliant (respect EOF command from LuCI)
Diffstat (limited to 'libs/sgi-wsapi/luasrc/sgi/wsapi.lua')
-rw-r--r-- | libs/sgi-wsapi/luasrc/sgi/wsapi.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua index 3b5302599..836295be9 100644 --- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua +++ b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua @@ -41,6 +41,8 @@ function run(wsapi_env) local status = 200 local x = coroutine.create(luci.dispatcher.httpdispatch) + local active = true + while id < 3 do res, id, data1, data2 = coroutine.resume(x, r) @@ -60,9 +62,12 @@ function run(wsapi_env) local function iter() local res, id, data = coroutine.resume(x) - if id == 4 then + if id == 4 and active then return data elseif id == 5 then + active = false + return "" + else return "" end if coroutine.status(x) == "dead" then |