diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-03-15 03:02:09 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-03-15 03:02:09 +0000 |
commit | 917df51c8fd55aae373ddb7e6a6df40b7d336fe8 (patch) | |
tree | c9b9dd3b175a6e7fcf7ac27daf050f2d5f032fd2 | |
parent | 0ae4e4464d090e98bd7daedae45320222a456599 (diff) | |
download | prosody-917df51c8fd55aae373ddb7e6a6df40b7d336fe8.tar.gz prosody-917df51c8fd55aae373ddb7e6a6df40b7d336fe8.zip |
portmanager: Fix pre-0.9 compatibility by taking default_interface and default_port from the listener instead of service table
-rw-r--r-- | core/portmanager.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index a87e14eb..a7c3c44e 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -69,6 +69,8 @@ function activate_service(service_name) 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 @@ function activate_service(service_name) 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); - or service_info.default_ports - or {service_info.default_port}); local bind_ports = set.new(config.get("*", config_prefix.."ports") + or service_info.default_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 |