summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/event_manager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/event_manager.lua')
-rw-r--r--misc/freeswitch/scripts/event_manager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/freeswitch/scripts/event_manager.lua b/misc/freeswitch/scripts/event_manager.lua
index 3d558e5..3991f8f 100644
--- a/misc/freeswitch/scripts/event_manager.lua
+++ b/misc/freeswitch/scripts/event_manager.lua
@@ -26,13 +26,15 @@ else
log:error('[event] EVENT_MANAGER_LOADER - No SIP domains found!');
end
+local event_consumer = nil;
freeswitch.setGlobalVariable('gs_event_manager', 'true');
while freeswitch.getGlobalVariable('gs_event_manager') ~= 'false' do
package.loaded['event.event'] = nil;
local manager_class = require('event.event');
- local event_manager = manager_class.EventManager:new{ log = log, database = database, domain = domain }
+ local event_manager = manager_class.EventManager:new{ log = log, database = database, domain = domain, consumer = event_consumer };
freeswitch.setGlobalVariable('gs_event_manager', 'true');
event_manager:run();
+ event_consumer = event_manager.consumer;
end
-- ensure database handle is released on exit