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($!)) {
if (defined $bytes_read && $bytes_read == 0) {
finish();
} else {
- _decode() if length $inmsg > 36;
+ _decode() if length $inmsg >= 36;
}
}
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;
# 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};