# HG changeset patch # User Matthew Wild # Date 1337693586 -3600 # Node ID a7c799a7a34b231a85de8630d04ba88a92a4d114 # Parent 05ea6c1ae393a4c1fb0c51a6ae978f387339e743 portmanager: Match service against service_info (:iter() doesn't match values) diff -r 05ea6c1ae393 -r a7c799a7a34b core/portmanager.lua --- 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