Software /
code /
prosody
Changeset
2352:a7ef564271a5
net_activate_ports: Use the default config option 'ports' when no option is specified.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 10 Dec 2009 05:07:32 +0500 |
parents | 2351:f8d002090cea |
children | 2353:54e650624ded |
files | prosody |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/prosody Thu Dec 10 05:04:09 2009 +0500 +++ b/prosody Thu Dec 10 05:07:32 2009 +0500 @@ -193,8 +193,9 @@ 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