Software /
code /
prosody
Diff
core/portmanager.lua @ 4786:ad6d4ab40b20
portmanager: Ensure port is always a number (thanks Zash)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 28 Apr 2012 18:45:04 +0100 |
parent | 4744:3be37768720d |
child | 4789:bed0c6117358 |
line wrap: on
line diff
--- a/core/portmanager.lua Sat Apr 28 18:36:03 2012 +0100 +++ b/core/portmanager.lua Sat Apr 28 18:45:04 2012 +0100 @@ -112,6 +112,7 @@ 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