Software /
code /
prosody
Changeset
5319:d20861bf900b
portmanager: Make sure foo_ports is a table
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 31 Jan 2013 15:48:55 +0100 |
parents | 5318:989acb4ad1de |
children | 5320:518d864b2ab8 |
files | core/portmanager.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/portmanager.lua Thu Jan 31 15:33:41 2013 +0100 +++ b/core/portmanager.lua Thu Jan 31 15:48:55 2013 +0100 @@ -89,11 +89,12 @@ 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") + local bind_ports = config.get("*", config_prefix.."ports") or service_info.default_ports or {service_info.default_port or listener.default_port -- COMPAT w/pre-0.9 - }); + } + bind_ports = set.new(type(bind_ports) ~= "table" and { bind_ports } or bind_ports ); local mode, ssl = listener.default_mode or "*a";