projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
02a0660
)
decode AGW messages when there 36 bytes available
author
minima
<minima>
Fri, 30 Mar 2001 18:34:45 +0000
(18:34 +0000)
committer
minima
<minima>
Fri, 30 Mar 2001 18:34:45 +0000
(18:34 +0000)
perl/AGWMsg.pm
patch
|
blob
|
history
perl/Msg.pm
patch
|
blob
|
history
diff --git
a/perl/AGWMsg.pm
b/perl/AGWMsg.pm
index 7582e2c723be8d45e0e3b0f23293e3d6f72174a3..a2a353f42e47c394bc5cb128b6826cbd26dbfe5c 100644
(file)
--- a/
perl/AGWMsg.pm
+++ b/
perl/AGWMsg.pm
@@
-183,6
+183,8
@@
sub _rcv { # Complement to _send
if (defined ($bytes_read)) {
if ($bytes_read > 0) {
$inmsg .= $msg;
if (defined ($bytes_read)) {
if ($bytes_read > 0) {
$inmsg .= $msg;
+# $msg =~ s/([\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+# dbg('connll', $msg);
}
} else {
if (Msg::_err_will_block($!)) {
}
} else {
if (Msg::_err_will_block($!)) {
@@
-196,7
+198,7
@@
FINISH:
if (defined $bytes_read && $bytes_read == 0) {
finish();
} else {
if (defined $bytes_read && $bytes_read == 0) {
finish();
} else {
- _decode() if length $inmsg > 36;
+ _decode() if length $inmsg >
=
36;
}
}
}
}
@@
-358,7
+360,8
@@
sub _decode
dbg('agw', "AGW Port: $_");
}
for (my $i = 0; $i < $noports; $i++) {
dbg('agw', "AGW Port: $_");
}
for (my $i = 0; $i < $noports; $i++) {
- _sendf('y', undef, undef, $i );
+ _sendf('y', undef, undef, $i);
+ _sendf('g', undef, undef, $i);
}
} else {
my $d = unpack "Z*", $data;
}
} else {
my $d = unpack "Z*", $data;
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index 3b9dbd36f2a4f546f4b25169f1360b0552bed40d..d1f2589b0aabb58d96af1d44a7b6f6b51d459bdf 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-482,7
+482,7
@@
sub event_loop {
# Quit the loop if no handles left to process
last unless ($rd_handles->count() || $wt_handles->count());
# Quit the loop if no handles left to process
last unless ($rd_handles->count() || $wt_handles->count());
- ($rset, $wset) = IO::Select->select($rd_handles, $wt_handles, $er_handles, $timeout);
+ ($rset, $wset
, $eset
) = IO::Select->select($rd_handles, $wt_handles, $er_handles, $timeout);
foreach $e (@$eset) {
&{$er_callbacks{$e}}($e) if exists $er_callbacks{$e};
foreach $e (@$eset) {
&{$er_callbacks{$e}}($e) if exists $er_callbacks{$e};