aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-03-15 03:02:09 +0000
committerMatthew Wild <mwild1@gmail.com>2012-03-15 03:02:09 +0000
commit373fb34e948918f0a74732337e6357a92a59e669 (patch)
treec9b9dd3b175a6e7fcf7ac27daf050f2d5f032fd2 /core
parenteafbf7d47eb4e65a8efb9b9daea112b470d3f4c8 (diff)
downloadprosody-373fb34e948918f0a74732337e6357a92a59e669.tar.gz
prosody-373fb34e948918f0a74732337e6357a92a59e669.zip
portmanager: Fix pre-0.9 compatibility by taking default_interface and default_port from the listener instead of service table
Diffstat (limited to 'core')
-rw-r--r--core/portmanager.lua9
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