diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-12-27 21:20:09 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-12-27 21:20:09 +0000 |
commit | b97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb (patch) | |
tree | 154f9c164833f7dd446a8b6c422485d436d83c98 /prosody | |
parent | 89eb3c5d00a0da8a72d303e898ecfd2f63f9eb2b (diff) | |
download | prosody-b97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb.tar.gz prosody-b97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb.zip |
Fix specifying ports in config, and SSL support
Diffstat (limited to 'prosody')
-rwxr-xr-x | prosody | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -123,9 +123,10 @@ if global_ssl_ctx then end -- start listening on sockets -local function do_ports(option, listener, default, key) +local function do_ports(option, listener, default, conntype) local ports = config.get("*", "core", option) or default; --if type(ports) == "number" then ports = {ports} end; + if type(ports) ~= "table" then log("error", "core."..option.." is not a table"); else @@ -133,15 +134,15 @@ local function do_ports(option, listener, default, key) if type(port) ~= "number" then log("error", "Non-numeric "..option..": "..tostring(port)); else - cl.start(listener, { ssl = global_ssl_ctx, [key] = port }); + cl.start(listener, { ssl = global_ssl_ctx, port = port, type = conntype }); end end end end -do_ports("c2s_ports", "xmppclient", {5222}, "port"); -do_ports("s2s_ports", "xmppserver", {5269}, "port"); -do_ports("legacy_ssl_ports", "xmppclient", {}, "legacy_ssl_port"); +do_ports("c2s_ports", "xmppclient", {5222}, "tls"); +do_ports("s2s_ports", "xmppserver", {5269}, "tcp"); +do_ports("legacy_ssl_ports", "xmppclient", {}, "ssl"); if config.get("*", "core", "console_enabled") then if cl.get("console") then |