diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-04-02 17:41:38 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-04-02 17:41:38 +0100 |
commit | da820882348572de470a13a1a50f529a51243aa5 (patch) | |
tree | 39ca42dddf3935546a0c3c37b2e2456a554899f1 /core/portmanager.lua | |
parent | 618661cda2a68afbe445ce079c15af25bdaa177b (diff) | |
parent | f7d4b04bf17c8b634eae00e814a995a88c5ba6cb (diff) | |
download | prosody-da820882348572de470a13a1a50f529a51243aa5.tar.gz prosody-da820882348572de470a13a1a50f529a51243aa5.zip |
Merge 0.9->0.10
Diffstat (limited to 'core/portmanager.lua')
-rw-r--r-- | core/portmanager.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index 421d7fc6..4cbf3eb3 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -89,7 +89,7 @@ function activate(service_name) if not service_info then return nil, "Unknown service: "..service_name; end - + local listener = service_info.listener; local config_prefix = (service_info.config_prefix or service_name).."_"; @@ -105,7 +105,7 @@ function activate(service_name) or listener.default_interface -- COMPAT w/pre0.9 or default_interfaces bind_interfaces = set.new(type(bind_interfaces)~="table" and {bind_interfaces} or bind_interfaces); - + local bind_ports = config.get("*", config_prefix.."ports") or service_info.default_ports or {service_info.default_port @@ -115,7 +115,7 @@ function activate(service_name) local mode, ssl = listener.default_mode or default_mode; local hooked_ports = {}; - + for interface in bind_interfaces do for port in bind_ports do local port_number = tonumber(port); @@ -190,7 +190,7 @@ function register_service(service_name, service_info) log("error", "Failed to activate service '%s': %s", service_name, err or "unknown error"); end end - + fire_event("service-added", { name = service_name, service = service_info }); return true; end |