From 284be50f1c3b7a7278335ef3db7abf8b8d9ec9ce Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 22 May 2012 14:33:06 +0100 Subject: portmanager: Match service against service_info (:iter() doesn't match values) --- core/portmanager.lua | 7 +++++-- 1 file 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 -- cgit v1.2.3