Software /
code /
prosody
Diff
core/portmanager.lua @ 4902:a7c799a7a34b
portmanager: Match service against service_info (:iter() doesn't match values)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 22 May 2012 14:33:06 +0100 |
parent | 4897:1a90e5225b22 |
child | 5009:b27ba2c83dd4 |
line wrap: on
line diff
--- a/core/portmanager.lua Tue May 22 14:31:19 2012 +0100 +++ b/core/portmanager.lua Tue May 22 14:33:06 2012 +0100 @@ -135,8 +135,11 @@ 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