From 87c31947552d1ccd1695c8c1c7279db1ffe648a0 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 02a7b8a2158a99029d7465c06b548a7a988faa2c 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 2e382ff38324f76c3282d4e10a259558de3232ff 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