aboutsummaryrefslogtreecommitdiffstats
path: root/core/portmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-28 18:45:04 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-28 18:45:04 +0100
commit99d16ae1392d520312dd3fecf642cb60abe81b0e (patch)
tree153d303c780b971cb5857b9390d21a2c57b96cc6 /core/portmanager.lua
parent9570749b05e6306177708a3dfafa63cb49a499df (diff)
downloadprosody-99d16ae1392d520312dd3fecf642cb60abe81b0e.tar.gz
prosody-99d16ae1392d520312dd3fecf642cb60abe81b0e.zip
portmanager: Ensure port is always a number (thanks Zash)
Diffstat (limited to 'core/portmanager.lua')
-rw-r--r--core/portmanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index 3bd143ef..5f53b61c 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -112,6 +112,7 @@ function activate(service_name)
for interface in bind_interfaces do
for port in bind_ports do
+ port = tonumber(port);
if #active_services:search(nil, interface, port) > 0 then
log("error", "Multiple services configured to listen on the same port ([%s]:%d): %s, %s", interface, port, active_services:search(nil, interface, port)[1][1].service.name or "<unnamed>", service_name or "<unnamed>");
else