projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made the \r\n work correctly in external input
[spider.git]
/
perl
/
ExtMsg.pm
diff --git
a/perl/ExtMsg.pm
b/perl/ExtMsg.pm
index a601d4edfa01c0a09da64a74859e50ffdd9d94c6..ee2ad231e40dfb8d3b935d62dfcc72fa197e348d 100644
(file)
--- 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');
}
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;
delete $conn->{msg};
} else {
$conn->{msg} = pop @lines;