diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-07-12 15:23:39 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-07-12 15:23:39 +0100 |
commit | c4841e0e92a8cce97c5fc3e689808aa4d63dc35a (patch) | |
tree | f8086a815fdbdd75e96a3092a58c6294af909b60 /plugins | |
parent | 04263369c807c434ebc9094723589098145beae5 (diff) | |
parent | 4117259212afab1c15f98eaeffb8c442cfa54c8c (diff) | |
download | prosody-c4841e0e92a8cce97c5fc3e689808aa4d63dc35a.tar.gz prosody-c4841e0e92a8cce97c5fc3e689808aa4d63dc35a.zip |
Merge with 0.5
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_bosh.lua | 12 | ||||
-rw-r--r-- | plugins/mod_httpserver.lua | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index b07238bd..ccf08ec4 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -276,16 +276,6 @@ function on_timer() end local ports = config.get(module.host, "core", "bosh_ports") or { 5280 }; -for _, options in ipairs(ports) do - local port, base, ssl, interface = 5280, "http-bind", false, nil; - if type(options) == "number" then - port = options; - elseif type(options) == "table" then - port, base, ssl, interface = options.port or 5280, options.path or "http-bind", options.ssl or false, options.interface; - elseif type(options) == "string" then - base = options; - end - httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } -end +httpserver.new_from_config(ports, handle_request); server.addtimer(on_timer); diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 98a3a36e..0f1d991c 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -28,14 +28,4 @@ local function handle_request(method, body, request) end local ports = config.get(module.host, "core", "http_ports") or { 5280 }; -for _, options in ipairs(ports) do - local port, base, ssl, interface = 5280, "files", false, nil; - if type(options) == "number" then - port = options; - elseif type(options) == "table" then - port, base, ssl, interface = options.port or 5280, options.path or "files", options.ssl or false, options.interface; - elseif type(options) == "string" then - base = options; - end - httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } -end +httpserver.new_from_config(ports, handle_request); |