diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-07-12 15:21:10 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-07-12 15:21:10 +0100 |
commit | ca69ee89225e918759e02fd7e36a04eb27900b11 (patch) | |
tree | 1a675e2e078755d70bcc25a9ccc0a3b70ca0d3c1 | |
parent | 9b42931a189ae66889607923f42c0938e23e2fa3 (diff) | |
download | prosody-ca69ee89225e918759e02fd7e36a04eb27900b11.tar.gz prosody-ca69ee89225e918759e02fd7e36a04eb27900b11.zip |
mod_bosh: Use new httpserver helper to initialise ports
-rw-r--r-- | plugins/mod_bosh.lua | 12 |
1 files changed, 1 insertions, 11 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); |