Software /
code /
prosody
Comparison
core/portmanager.lua @ 4687:bd3a852b949a
portmanager: Fix selecting bind_interfaces from pre-0.9 config options.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 25 Apr 2012 14:53:54 +0200 |
parent | 4677:05d8b4099cf5 |
child | 4741:0653476ac3a3 |
comparison
equal
deleted
inserted
replaced
4686:5fd661424b9f | 4687:bd3a852b949a |
---|---|
74 local config_prefix = (service_info.config_prefix or service_name).."_"; | 74 local config_prefix = (service_info.config_prefix or service_name).."_"; |
75 if config_prefix == "_" then | 75 if config_prefix == "_" then |
76 config_prefix = ""; | 76 config_prefix = ""; |
77 end | 77 end |
78 | 78 |
79 local bind_interfaces = set.new(config.get("*", config_prefix.."interfaces") | 79 local bind_interfaces = config.get("*", config_prefix.."interfaces") |
80 or config.get("*", config_prefix.."interface") -- COMPAT w/pre-0.9 | 80 or config.get("*", config_prefix.."interface") -- COMPAT w/pre-0.9 |
81 or (service_info.private and default_local_interfaces) | 81 or (service_info.private and default_local_interfaces) |
82 or config.get("*", "interfaces") | 82 or config.get("*", "interfaces") |
83 or config.get("*", "interface") -- COMPAT w/pre-0.9 | 83 or config.get("*", "interface") -- COMPAT w/pre-0.9 |
84 or listener.default_interface -- COMPAT w/pre0.9 | 84 or listener.default_interface -- COMPAT w/pre0.9 |
85 or default_interfaces); | 85 or default_interfaces |
86 bind_interfaces = set.new(type(bind_interfaces)~="table" and {bind_interfaces} or bind_interfaces); | |
86 | 87 |
87 local bind_ports = set.new(config.get("*", config_prefix.."ports") | 88 local bind_ports = set.new(config.get("*", config_prefix.."ports") |
88 or service_info.default_ports | 89 or service_info.default_ports |
89 or {service_info.default_port | 90 or {service_info.default_port |
90 or listener.default_port -- COMPAT w/pre-0.9 | 91 or listener.default_port -- COMPAT w/pre-0.9 |