# HG changeset patch # User Matthew Wild # Date 1331780529 0 # Node ID 03d9fe1bcdd3f5b70e39e1c12c984a2ac706f457 # Parent 29a9988c1e1b8cb1efdde1efad6cdbdd7cc5a520 portmanager: Fix pre-0.9 compatibility by taking default_interface and default_port from the listener instead of service table diff -r 29a9988c1e1b -r 03d9fe1bcdd3 core/portmanager.lua --- a/core/portmanager.lua Thu Mar 15 02:56:44 2012 +0000 +++ b/core/portmanager.lua Thu Mar 15 03:02:09 2012 +0000 @@ -69,6 +69,8 @@ return nil, "Unknown service: "..service_name; end + local listener = service_info.listener; + local config_prefix = (service_info.config_prefix or service_name).."_"; if config_prefix == "_" then config_prefix = ""; @@ -79,14 +81,13 @@ or (service_info.private and default_local_interfaces) or config.get("*", "interfaces") or config.get("*", "interface") -- COMPAT w/pre-0.9 - or service_info.default_interface -- COMPAT w/pre0.9 + or listener.default_interface -- COMPAT w/pre0.9 or default_interfaces); + local bind_ports = set.new(config.get("*", config_prefix.."ports") or service_info.default_ports - or {service_info.default_port}); - local bind_ports = set.new(config.get("*", config_prefix.."ports") + or {listener.default_port}); -- COMPAT w/pre-0.9 - local listener = service_info.listener; local mode = listener.default_mode or "*a"; local ssl; if service_info.encryption == "ssl" then