From 2eb96829a9b19c1cf13d196a8e0da24345a5ba3c Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 2 Mar 2001 22:10:33 +0000 Subject: [PATCH] fix some bugs --- perl/ExtMsg.pm | 2 +- perl/Msg.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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$/) { -- 2.43.0