aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-12-27 21:20:09 +0000
committerMatthew Wild <mwild1@gmail.com>2008-12-27 21:20:09 +0000
commitb97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb (patch)
tree154f9c164833f7dd446a8b6c422485d436d83c98 /prosody
parent89eb3c5d00a0da8a72d303e898ecfd2f63f9eb2b (diff)
downloadprosody-b97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb.tar.gz
prosody-b97b1db2a0fb9d14bb8a61e72bfddb103e4e53cb.zip
Fix specifying ports in config, and SSL support
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody11
1 files changed, 6 insertions, 5 deletions
diff --git a/prosody b/prosody
index a386324b..2cff8ca4 100755
--- a/prosody
+++ b/prosody
@@ -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