aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-08-09 17:47:26 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-08-09 17:47:26 +0500
commit9af3cc09129b9e8e7a1a075b4ff08d1464191461 (patch)
tree1fbe56310dc81496e35286b0bd08aefad25bff5f
parent8200a2adc8e06496b39b3d7c3aec54babde8a418 (diff)
downloadprosody-9af3cc09129b9e8e7a1a075b4ff08d1464191461.tar.gz
prosody-9af3cc09129b9e8e7a1a075b4ff08d1464191461.zip
mod_bosh: Updated to use module:get_option instead of configmanager
-rw-r--r--plugins/mod_bosh.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 743ebdef..615ad30b 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -6,7 +6,6 @@
-- COPYING file in the source package for more information.
--
-
module.host = "*" -- Global module
local hosts = _G.hosts;
@@ -23,14 +22,13 @@ local st = require "util.stanza";
local logger = require "util.logger";
local log = logger.init("mod_bosh");
local stream_callbacks = { stream_tag = "http://jabber.org/protocol/httpbind|body" };
-local config = require "core.configmanager";
local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send)
-local BOSH_DEFAULT_HOLD = tonumber(config.get("*", "core", "bosh_default_hold")) or 1;
-local BOSH_DEFAULT_INACTIVITY = tonumber(config.get("*", "core", "bosh_max_inactivity")) or 60;
-local BOSH_DEFAULT_POLLING = tonumber(config.get("*", "core", "bosh_max_polling")) or 5;
-local BOSH_DEFAULT_REQUESTS = tonumber(config.get("*", "core", "bosh_max_requests")) or 2;
-local BOSH_DEFAULT_MAXPAUSE = tonumber(config.get("*", "core", "bosh_max_pause")) or 300;
+local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1;
+local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60;
+local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5;
+local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2;
+local BOSH_DEFAULT_MAXPAUSE = tonumber(module:get_option("bosh_max_pause")) or 300;
local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8" };
@@ -275,7 +273,7 @@ function on_timer()
end
end
-local ports = config.get(module.host, "core", "bosh_ports") or { 5280 };
+local ports = module:get_option("bosh_ports") or { 5280 };
httpserver.new_from_config(ports, "http-bind", handle_request);
server.addtimer(on_timer);