From: minima Date: Fri, 2 Mar 2001 22:10:33 +0000 (+0000) Subject: fix some bugs X-Git-Tag: R_1_47~167 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2eb96829a9b19c1cf13d196a8e0da24345a5ba3c;p=spider.git fix some bugs --- diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index dafa8566..f2d13264 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -76,7 +76,7 @@ sub dequeue } elsif ($conn->{state} eq 'WC') { if (exists $conn->{cmd} && @{$conn->{cmd}}) { $conn->_docmd($msg); - unless (@{$conn->{cmd}}) { + unless (exists $conn->{cmd} && @{$conn->{cmd}}) { $conn->{state} = 'C'; &{$conn->{rproc}}($conn, "O$conn->{call}|telnet"); delete $conn->{cmd}; diff --git a/perl/Msg.pm b/perl/Msg.pm index 02795812..774db635 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -244,6 +244,7 @@ sub _rcv { # Complement to _send if ($bytes_read > 0) { if ($msg =~ /\n/) { @lines = split /\r?\n/, $msg; + $lines[0] = '' unless @lines; $lines[0] = $conn->{msg} . $lines[0] if exists $conn->{msg}; push @lines, ' ' unless @lines; if ($msg =~ /\n$/) {