From 0f1c3d2435fd6db2dfe35aae958d92e620e1c383 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 20 Jul 2021 18:20:47 -0400 Subject: [PATCH] chore(tools): remove unused function from striker-manage-vnc-pipes --- tools/striker-manage-vnc-pipes | 46 ---------------------------------- 1 file changed, 46 deletions(-) diff --git a/tools/striker-manage-vnc-pipes b/tools/striker-manage-vnc-pipes index 7dd9d53c..76b3d673 100755 --- a/tools/striker-manage-vnc-pipes +++ b/tools/striker-manage-vnc-pipes @@ -648,52 +648,6 @@ sub stop_ssh_tunnel } } -sub stop_related -{ - my $parameters = shift; - my $ws_pid = $parameters->{ws_pid}; - my $ssh_tunnel_pid = $parameters->{ssh_tunnel_pid}; - my $select_pid_field; - my $condition_pid_field; - my $condition_pid_value; - my $stop_function; - - if (defined $ws_pid) - { - $select_pid_field = "ssh_tunnel_pid"; - $condition_pid_field = "ws_pid"; - $condition_pid_value = $ws_pid; - $stop_function = \&stop_ssh_tunnel - } - elsif (defined $ssh_tunnel_pid) - { - $select_pid_field = "ws_pid"; - $condition_pid_field = "ssh_tunnel_pid"; - $condition_pid_value = $ssh_tunnel_pid; - $stop_function = \&stop_websockify - } - - my $query = " -SELECT - hos.host_name, vnc.".$select_pid_field." -FROM - public.vnc_pipes AS vnc -JOIN - public.hosts AS hos -ON - vnc.ssh_tunnel_host_uuid = hos.host_uuid -WHERE - vnc.".$condition_pid_field." = ".$anvil->Database->quote($condition_pid_value)." -;"; - - my $results = $anvil->Database->query({ query => $query, source => $THIS_FILE, line => __LINE__ }); - - foreach my $row (@{$results}) - { - $stop_function->({ host_name => $row->[0], ws_pid => $row->[1], ssh_tunnel_pid => $row->[1] }); - } -} - sub create_vnc_pipes_table { my $query = "