Software /
code /
prosody
Comparison
core/portmanager.lua @ 4609:83a5377ffea2
portmanager: Fix log message when multiple services are configured to use the same port
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 14 Mar 2012 21:40:14 +0000 |
parent | 4608:01d52f31b6b3 |
child | 4612:8bb93860fe46 |
comparison
equal
deleted
inserted
replaced
4608:01d52f31b6b3 | 4609:83a5377ffea2 |
---|---|
93 end | 93 end |
94 | 94 |
95 for interface in bind_interfaces do | 95 for interface in bind_interfaces do |
96 for port in bind_ports do | 96 for port in bind_ports do |
97 if not service_info.multiplex and #active_services:search(nil, interface, port) > 0 then | 97 if not service_info.multiplex and #active_services:search(nil, interface, port) > 0 then |
98 log("error", "Multiple services configured to listen on the same port: %s, %s", table.concat(active_services:search(nil, interface, port), ", "), service_name); | 98 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>"); |
99 else | 99 else |
100 local handler, err = server.addserver(interface, port, listener, mode, ssl); | 100 local handler, err = server.addserver(interface, port, listener, mode, ssl); |
101 if not handler then | 101 if not handler then |
102 log("error", "Failed to open server port %d on %s, %s", port, interface, error_to_friendly_message(service_name, port, err)); | 102 log("error", "Failed to open server port %d on %s, %s", port, interface, error_to_friendly_message(service_name, port, err)); |
103 else | 103 else |