From 4e5f5c41ae551495d5f14ae777de2ad27845b428 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 13 May 2015 17:07:30 +0100 Subject: portmanager: Add luacheck annotations --- core/portmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/portmanager.lua b/core/portmanager.lua index bbb7c215..ca99a1dd 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -152,7 +152,7 @@ function activate(service_name) end function deactivate(service_name, service_info) - for name, interface, port, n, active_service + for name, interface, port, n, active_service --luacheck: ignore 213/name 213/n 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); -- cgit v1.2.3 From 36c0cf5d9dec93ab76e84104e16e3dd077f5f57a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 13 May 2015 17:08:20 +0100 Subject: portmanager: Rename variable to avoid name conflict [luacheck] --- core/portmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/portmanager.lua b/core/portmanager.lua index ca99a1dd..e7516886 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -192,11 +192,11 @@ function unregister_service(service_name, service_info) end function close(interface, port) - local service, server = get_service_at(interface, port); + local service, service_server = get_service_at(interface, port); if not service then return false, "port-not-open"; end - server:close(); + service_server:close(); active_services:remove(service.name, interface, port); log("debug", "Removed listening service %s from [%s]:%d", service.name, interface, port); return true; -- cgit v1.2.3 From b925d6f5808918b0fc75ec04b17bc9d3b4f209a3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 13 May 2015 17:08:34 +0100 Subject: portmanager: Remove unused argument from function [luacheck] --- core/portmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/portmanager.lua b/core/portmanager.lua index e7516886..e800cf36 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -211,7 +211,7 @@ function get_service(service_name) return (services[service_name] or {})[1]; end -function get_active_services(...) +function get_active_services() return active_services; end -- cgit v1.2.3