Software /
code /
prosody
Changeset
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 |
parents | 4901:05ea6c1ae393 |
children | 4903:c576d2175fa4 |
files | core/portmanager.lua |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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