projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed problem with blank line input (for now)
[spider.git]
/
perl
/
ExtMsg.pm
diff --git
a/perl/ExtMsg.pm
b/perl/ExtMsg.pm
index 33c17bfd44bcc18bef606c60a221453989da6259..122d3ec837e52cfeccbb3ee9092274784a477c0b 100644
(file)
--- a/
perl/ExtMsg.pm
+++ b/
perl/ExtMsg.pm
@@
-58,7
+58,8
@@
sub dequeue
my $conn = shift;
my $msg;
my $conn = shift;
my $msg;
- while ($msg = shift @{$conn->{inqueue}}){
+ while (@{$conn->{inqueue}}){
+ $msg = shift @{$conn->{inqueue}};
dbg('connect', $msg) unless $conn->{state} eq 'C';
$msg =~ s/\xff\xfa.*\xff\xf0|\xff[\xf0-\xfe].//g; # remove telnet options
dbg('connect', $msg) unless $conn->{state} eq 'C';
$msg =~ s/\xff\xfa.*\xff\xf0|\xff[\xf0-\xfe].//g; # remove telnet options
@@
-91,6
+92,7
@@
sub dequeue
}
}
if ($conn->{msg} && $conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}}) {
}
}
if ($conn->{msg} && $conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}}) {
+ dbg('connect', $conn->{msg});
$conn->_docmd($conn->{msg});
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
$conn->{state} = 'C';
$conn->_docmd($conn->{msg});
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
$conn->{state} = 'C';
@@
-270,6
+272,10
@@
sub _doclient
my @f = split /\s+/, $line;
$conn->{call} = uc $f[0] if $f[0];
$conn->{csort} = $f[1] if $f[1];
my @f = split /\s+/, $line;
$conn->{call} = uc $f[0] if $f[0];
$conn->{csort} = $f[1] if $f[1];
+ $conn->{state} = 'C';
+ &{$conn->{rproc}}($conn, "O$conn->{call}|telnet");
+ delete $conn->{cmd};
+ $conn->{timeout}->del_timer if $conn->{timeout};
}
sub _send_file
}
sub _send_file
@@
-282,7
+288,7
@@
sub _send_file
if ($f) {
while (<$f>) {
chomp;
if ($f) {
while (<$f>) {
chomp;
- $conn->send_
later($_
);
+ $conn->send_
raw($_ . $conn->{lineend}
);
}
$f->close;
}
}
$f->close;
}