From ef426e3d1aa4c2ea819ac56b1a95547cd45aae23 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 10 Dec 2009 05:07:32 +0500 Subject: net_activate_ports: Use the default config option 'ports' when no option is specified. --- prosody | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'prosody') diff --git a/prosody b/prosody index 0a74051f..c9ff46c4 100755 --- a/prosody +++ b/prosody @@ -193,8 +193,9 @@ function init_global_state() local cl = require "net.connlisteners"; function prosody.net_activate_ports(option, listener, default, conntype) conntype = conntype or (global_ssl_ctx and "tls") or "tcp"; + option = option and option.."_ports" or "ports"; if not cl.get(listener) then return; end - local ports = config.get("*", "core", option.."_ports") or default; + local ports = config.get("*", "core", option) or default; if type(ports) == "number" then ports = {ports} end; if type(ports) ~= "table" then -- cgit v1.2.3