made the \r\n work correctly in external input
authorminima <minima>
Tue, 13 Mar 2001 21:50:02 +0000 (21:50 +0000)
committerminima <minima>
Tue, 13 Mar 2001 21:50:02 +0000 (21:50 +0000)
Changes
cmd/show/isolate.pl
perl/ExtMsg.pm
perl/cluster.pl

diff --git a/Changes b/Changes
index 6ee6f6d7a929179ff280a974099ec697c5c60b2e..e657a56910025357b2f94f9264d83a4f66c2c8e4 100644 (file)
--- 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)
index bb66e5177777a7d9069e7a5537eae934e2733a15..35eb822a2920f5341a15ec57b262b2f8116fbfa3 100644 (file)
@@ -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;
index a601d4edfa01c0a09da64a74859e50ffdd9d94c6..ee2ad231e40dfb8d3b935d62dfcc72fa197e348d 100644 (file)
@@ -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;
index 181e3054c77d83611a97ba20d9aea4736ae5ef47..fb48c1e005b64b133f35169371347945b4361c26 100755 (executable)
@@ -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;