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 | 284be50f1c3b7a7278335ef3db7abf8b8d9ec9ce (patch) | |
tree | 6536cbd12594eab25f7547e123bb610b1027b92d /core/portmanager.lua | |
parent | 532d3ba7156e0e614bceef4f8477da878e4340b5 (diff) | |
download | prosody-284be50f1c3b7a7278335ef3db7abf8b8d9ec9ce.tar.gz prosody-284be50f1c3b7a7278335ef3db7abf8b8d9ec9ce.zip |
portmanager: Match service against service_info (:iter() doesn't match values)
Diffstat (limited to 'core/portmanager.lua')
-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 |