diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-22 14:33:06 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-22 14:33:06 +0100 |
commit | c7f054eae60756a7918b31dbf1c55f7bd9317002 (patch) | |
tree | 6536cbd12594eab25f7547e123bb610b1027b92d /core | |
parent | 53793b75db0f08ad5a13c1df183d375b79f42e3b (diff) | |
download | prosody-c7f054eae60756a7918b31dbf1c55f7bd9317002.tar.gz prosody-c7f054eae60756a7918b31dbf1c55f7bd9317002.zip |
portmanager: Match service against service_info (:iter() doesn't match values)
Diffstat (limited to 'core')
-rw-r--r-- | core/portmanager.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index 420c59ff..b563fb10 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -135,8 +135,11 @@ function activate(service_name) end function deactivate(service_name, service_info) - for name, interface, port, active_service in active_services:iter(service_name, nil, nil, service_info) do - close(interface, port); + for name, interface, port, n, active_service + in active_services:iter(service_name or service_info and service_info.name, nil, nil, nil) do + if service_info == nil or active_service.service == service_info then + close(interface, port); + end end log("info", "Deactivated service '%s'", service_name or service_info.name); end |