aboutsummaryrefslogtreecommitdiffstats
path: root/core/portmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-04-25 14:53:54 +0200
committerKim Alvefur <zash@zash.se>2012-04-25 14:53:54 +0200
commit8d878575e6834a32a3170618c66655b6c5c1ab16 (patch)
tree5714b7fa76f80fa5da894240f51aa0a17e7c11ba /core/portmanager.lua
parent34eff6d74ca04ed10cb8c10d368d36c30d85bf16 (diff)
downloadprosody-8d878575e6834a32a3170618c66655b6c5c1ab16.tar.gz
prosody-8d878575e6834a32a3170618c66655b6c5c1ab16.zip
portmanager: Fix selecting bind_interfaces from pre-0.9 config options.
Diffstat (limited to 'core/portmanager.lua')
-rw-r--r--core/portmanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index da238dba..e2994308 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -76,13 +76,14 @@ function activate_service(service_name)
config_prefix = "";
end
- local bind_interfaces = set.new(config.get("*", config_prefix.."interfaces")
+ local bind_interfaces = config.get("*", config_prefix.."interfaces")
or config.get("*", config_prefix.."interface") -- COMPAT w/pre-0.9
or (service_info.private and default_local_interfaces)
or config.get("*", "interfaces")
or config.get("*", "interface") -- COMPAT w/pre-0.9
or listener.default_interface -- COMPAT w/pre0.9
- or default_interfaces);
+ or default_interfaces
+ bind_interfaces = set.new(type(bind_interfaces)~="table" and {bind_interfaces} or bind_interfaces);
local bind_ports = set.new(config.get("*", config_prefix.."ports")
or service_info.default_ports