summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/event/event.lua
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/event/event.lua')
-rw-r--r--misc/freeswitch/scripts/event/event.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/misc/freeswitch/scripts/event/event.lua b/misc/freeswitch/scripts/event/event.lua
index 8e67bc9..08d8bfe 100644
--- a/misc/freeswitch/scripts/event/event.lua
+++ b/misc/freeswitch/scripts/event/event.lua
@@ -1,5 +1,5 @@
-- Gemeinschaft 5 module: event manager class
--- (c) AMOOMA GmbH 2012
+-- (c) AMOOMA GmbH 2012-2013
--
module(...,package.seeall)
@@ -28,10 +28,8 @@ end
function EventManager.load_event_modules(self)
- local CONFIG_FILE_NAME = '/opt/freeswitch/scripts/ini/events.ini';
-
- require 'common.configuration_file'
- self.config = common.configuration_file.get(CONFIG_FILE_NAME);
+ require 'common.configuration_table'
+ self.config = common.configuration_table.get(self.database, 'events');
return self.config.modules;
end
@@ -40,7 +38,7 @@ end
function EventManager.load_event_handlers(self, event_modules)
event_handlers = {}
- for index, event_module_name in ipairs(event_modules) do
+ for event_module_name, index in pairs(event_modules) do
event_module = require('event.' .. event_module_name);
if event_module then
self.log:info('[event] EVENT_MANAGER - loading handler module: ', event_module_name);