Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
4785:36234dc4b177 | 4786:ad6d4ab40b20 |
---|---|
110 end | 110 end |
111 end | 111 end |
112 | 112 |
113 for interface in bind_interfaces do | 113 for interface in bind_interfaces do |
114 for port in bind_ports do | 114 for port in bind_ports do |
115 port = tonumber(port); | |
115 if #active_services:search(nil, interface, port) > 0 then | 116 if #active_services:search(nil, interface, port) > 0 then |
116 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>"); | 117 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>"); |
117 else | 118 else |
118 local handler, err = server.addserver(interface, port, listener, mode, ssl); | 119 local handler, err = server.addserver(interface, port, listener, mode, ssl); |
119 if not handler then | 120 if not handler then |