From 2a9a56c26e1ed0622dc9cd7fc48b0498b059e274 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 13 Mar 2001 21:50:02 +0000 Subject: [PATCH] made the \r\n work correctly in external input --- Changes | 1 + cmd/show/isolate.pl | 2 +- perl/ExtMsg.pm | 6 +++--- perl/cluster.pl | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 6ee6f6d7..e657a569 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ 1. implemented first cut at non blocking connect 2. removed memory leakage in connects 3. add link IP address if available on who +4. made the \r\n work correctly 10Mar01======================================================================= 1. minor changes to the admin manual to reflect differences in distibutions thanks to pa3ezl (g0vgs) diff --git a/cmd/show/isolate.pl b/cmd/show/isolate.pl index bb66e517..35eb822a 100644 --- a/cmd/show/isolate.pl +++ b/cmd/show/isolate.pl @@ -17,7 +17,7 @@ use DB_File; my ($action, $count, $key, $data) = (0,0,0,0); for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) { - if ($data =~ m{isolate =>}) { + if ($data =~ m{isolate\s*=>}) { my $u = DXUser->get_current($key); if ($u && $u->isolate) { push @out, $key; diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index a601d4ed..ee2ad231 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -68,9 +68,9 @@ sub dequeue if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) { $conn->to_connected($conn->{call}, 'O', 'telnet'); } - } elsif ($conn->{msg} =~ /\n/) { - my @lines = split /\r?\n/, $conn->{msg}; - if ($conn->{msg} =~ /\n$/) { + } elsif ($conn->{msg} =~ /\cJ/) { + my @lines = $conn->{msg} =~ /([^\cM\cJ]*)\cM?\cJ/g; + if ($conn->{msg} =~ /\cJ$/) { delete $conn->{msg}; } else { $conn->{msg} = pop @lines; diff --git a/perl/cluster.pl b/perl/cluster.pl index 181e3054..fb48c1e0 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -421,7 +421,7 @@ dbg('err', "orft we jolly well go ..."); for (;;) { # $DB::trace = 1; - Msg->event_loop(10, 0.001); + Msg->event_loop(25, 0.001); my $timenow = time; process_inqueue(); # read in lines from the input queue and despatch them # $DB::trace = 0; -- 2.43.0