Software /
code /
prosody
Diff
core/portmanager.lua @ 6054:7a5ddbaf758d
Merge 0.9->0.10
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 02 Apr 2014 17:41:38 +0100 |
parent | 6041:a97591d2e1ad |
parent | 5776:bd0ff8ae98a8 |
child | 6295:cb12ff49503d |
line wrap: on
line diff
--- a/core/portmanager.lua Wed Apr 02 14:31:19 2014 +0100 +++ b/core/portmanager.lua Wed Apr 02 17:41:38 2014 +0100 @@ -89,7 +89,7 @@ if not service_info then return nil, "Unknown service: "..service_name; end - + local listener = service_info.listener; local config_prefix = (service_info.config_prefix or service_name).."_"; @@ -105,7 +105,7 @@ or listener.default_interface -- COMPAT w/pre0.9 or default_interfaces bind_interfaces = set.new(type(bind_interfaces)~="table" and {bind_interfaces} or bind_interfaces); - + local bind_ports = config.get("*", config_prefix.."ports") or service_info.default_ports or {service_info.default_port @@ -115,7 +115,7 @@ local mode, ssl = listener.default_mode or default_mode; local hooked_ports = {}; - + for interface in bind_interfaces do for port in bind_ports do local port_number = tonumber(port); @@ -190,7 +190,7 @@ log("error", "Failed to activate service '%s': %s", service_name, err or "unknown error"); end end - + fire_event("service-added", { name = service_name, service = service_info }); return true; end