From ec1a1ed0238bbec1b76f1e540bd5410e73dd2742 Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 26 Oct 2022 12:34:41 +0300 Subject: [PATCH 1/2] Fix cap --- xterm/lang/en | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xterm/lang/en b/xterm/lang/en index b3c06dfc2..398fc9632 100644 --- a/xterm/lang/en +++ b/xterm/lang/en @@ -1,5 +1,5 @@ index_title=Interactive Shell -index_cpan=The Perl module $1 needed to accept Websockets connections is not available, but you can install it automatically using Webmin's Perl Modules module. +index_cpan=The Perl module $1 needed to accept WebSockets connections is not available, but you can install it automatically using Webmin's Perl Modules module. index_euser=User $1 to run the shell as does not exist! acl_user=Run shell as Unix user From 29960cfe9204f8cd8cb6536772eedf4a51a1c952 Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 26 Oct 2022 13:06:40 +0300 Subject: [PATCH 2/2] Fix indent --- xterm/shellserver.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xterm/shellserver.pl b/xterm/shellserver.pl index 7443cf984..de854043b 100755 --- a/xterm/shellserver.pl +++ b/xterm/shellserver.pl @@ -37,7 +37,7 @@ Net::WebSocket::Server->new( print STDERR "got websockets connection\n"; if ($wsconn) { print STDERR "Too many connections to the same port!\n"; - &cleanup_miniserv(); + &cleanup_miniserv(); kill('KILL', $pid) if ($pid); exit(1); } @@ -68,7 +68,7 @@ Net::WebSocket::Server->new( }, disconnect => sub { print STDERR "websocket connection closed\n"; - &cleanup_miniserv(); + &cleanup_miniserv(); kill('KILL', $pid) if ($pid); exit(0); } @@ -79,10 +79,10 @@ Net::WebSocket::Server->new( # Got something from the shell my $buf; my $ok = sysread($shellfh, $buf, 1); - if ($ok <= 0) { - &cleanup_miniserv(); - exit(0); - } + if ($ok <= 0) { + &cleanup_miniserv(); + exit(0); + } if ($wsconn) { $wsconn->send_binary($buf); }