summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-09 13:54:03 +0100
committerspag <spag@golwen.net>2013-01-09 13:54:03 +0100
commit706d34820b236d28e7dd12ba90dfc1dd585d698f (patch)
tree8b9b6c071042ffa4b6d36d1a9b113c1e17d8f176 /misc/freeswitch/scripts
parent99f84f09539df465db987b11c7f6b40479e10125 (diff)
read event_manager configuration from database
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r--misc/freeswitch/scripts/event/event.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/misc/freeswitch/scripts/event/event.lua b/misc/freeswitch/scripts/event/event.lua
index 8e67bc9..c57b32a 100644
--- a/misc/freeswitch/scripts/event/event.lua
+++ b/misc/freeswitch/scripts/event/event.lua
@@ -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);