Skip to content

Commit

Permalink
clusterd: Refactor run_cmd into its only caller
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jan 29, 2025
1 parent eb7ecab commit 185c5ad
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions clusterd/clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ sub clp_rx_LSOF {
close $socket;
}

sub run_cmd {
sub clp_rx_CMD {
my ($socket,@cmd)=@_;
my $pid=fork;
unless (defined $pid) {
Expand Down Expand Up @@ -1017,6 +1017,7 @@ sub run_cmd {
}
}
}
close $socket;
}

#----------- CLP cluster protocol -----------------------------
Expand Down Expand Up @@ -1086,12 +1087,6 @@ sub clp_send_message { # clp_send_message($socket, @args)
$s->send(pack('n',length($data)).$data);
}

sub clp_rx_CMD {
my ($socket,@args)=@_;
run_cmd($socket,@args);
close $socket;
}

sub send_tcp_cp_sync {
my ($s, @args) = @_;
my $data = sign($CLUSTER_PW, encode(@args));
Expand Down

0 comments on commit 185c5ad

Please sign in to comment.