aboutsummaryrefslogtreecommitdiffstats
path: root/net/connlisteners.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-21 17:11:59 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-21 17:11:59 +0000
commit5f0238bc36814cd6d0beefde1a3a31d39d01b5e4 (patch)
tree2e99bc4bfbe7159f6b1351b81579e9686f4fb706 /net/connlisteners.lua
parentecb81f3ad2145fc28cbc81c87769cc1cf6ad61d1 (diff)
downloadprosody-5f0238bc36814cd6d0beefde1a3a31d39d01b5e4.tar.gz
prosody-5f0238bc36814cd6d0beefde1a3a31d39d01b5e4.zip
net.connlisteners: Standardise on new syntax for addserver(), and clean up a bit
Diffstat (limited to 'net/connlisteners.lua')
-rw-r--r--net/connlisteners.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua
index 230d92a4..a9b92a8c 100644
--- a/net/connlisteners.lua
+++ b/net/connlisteners.lua
@@ -61,9 +61,14 @@ function start(name, udata)
end
end
- return server.addserver(h,
- (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0),
- (udata and udata.interface) or h.default_interface or "*", (udata and udata.mode) or h.default_mode or 1, (udata and udata.ssl) or nil, 99999999, udata and udata.type == "ssl");
+ local interface = (udata and udata.interface) or h.default_interface or "*";
+ local port = (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0);
+ local mode = (udata and udata.mode) or h.default_mode or 1;
+ local ssl = (udata and udata.ssl) or nil;
+ local maxclients = 99999999;
+ local autossl = udata and udata.type == "ssl";
+
+ return server.addserver(interface, port, h, mode, ssl, autossl);
end
return _M;