summaryrefslogtreecommitdiffstats
path: root/conf.d/project/lua.d/onload-daemon-01-init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/project/lua.d/onload-daemon-01-init.lua')
-rw-r--r--conf.d/project/lua.d/onload-daemon-01-init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/conf.d/project/lua.d/onload-daemon-01-init.lua b/conf.d/project/lua.d/onload-daemon-01-init.lua
index ebdc678..26ff08a 100644
--- a/conf.d/project/lua.d/onload-daemon-01-init.lua
+++ b/conf.d/project/lua.d/onload-daemon-01-init.lua
@@ -21,7 +21,7 @@ _Global_Context={}
--[[
This function is call during controller init phase as describe in onload-daemon-sample.json
It receives two argument 1st one is the source (here on load) second one is the arguments
- as expose in config file.
+ as expose in config file.
In this sample we create an event that take the name of args["zzzz"], the resulting handle
is save into _Global_Context for further use.
@@ -32,17 +32,17 @@ _Global_Context={}
function _Sample_Controller_Init(source, control)
printf ("[-- Sample_Controller_Init --] source=%d control=%s", source, Dump_Table(control))
-
+
-- if no argument return now
- if (control==nil or control["zzzz"]==nil) then
+ if (control==nil or control["zzzz"]==nil) then
printf ("[-- Sample_Controller_Init --] no event name given")
return
end
-- set a count to make more visible each call
_Global_Context["counter"]=0
-
+
-- just for fun create an event
_Global_Context["event"]=AFB:evtmake(control["zzzz"])
-end
+end