]> dxcluster.net Git - spider.git/commitdiff
fix some bugs
authorminima <minima>
Fri, 2 Mar 2001 22:10:33 +0000 (22:10 +0000)
committerminima <minima>
Fri, 2 Mar 2001 22:10:33 +0000 (22:10 +0000)
perl/ExtMsg.pm
perl/Msg.pm

index dafa8566be661a1893395c4dfc108f88fe8fe8e8..f2d132645356c42e56e2778ae5feb15b9d15f1c6 100644 (file)
@@ -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};
index 02795812e40bc5da3445953b0e56e382ff46ef27..774db635e627f0aeae5cc24fb7da8ce00f63116e 100644 (file)
@@ -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$/) {