projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
decode AGW messages when there 36 bytes available
[spider.git]
/
perl
/
AGWMsg.pm
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;