mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
ONKYO_AVR: protocol independent EOL recognition
git-svn-id: https://svn.fhem.de/fhem/trunk@4575 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e645a2781b
commit
854274aaf7
@ -1393,11 +1393,11 @@ sub ONKYO_AVR_sysreadline($;$$) {
|
||||
|
||||
###################################
|
||||
sub ONKYO_AVR_at_eol($;$) {
|
||||
if ( defined( $_[1] ) && $_[1] eq "pre2013" ) {
|
||||
$_[0] =~ /\r\z/;
|
||||
if ( $_[0] =~ /\r\z/ || $_[0] =~ /\r\n\z/ ) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
$_[0] =~ /\r\n\z/;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1452,7 +1452,7 @@ sub ONKYO_AVR_read($$) {
|
||||
|
||||
my $body = substr $$rbuf, 0, $data_size, '';
|
||||
my $sd = substr $body, 0, 2, '';
|
||||
$body =~ s/([\032\r\n]|[\032\r]|[\032]|[\r\n]|[\r])+$//;
|
||||
$body =~ s/([\032\r\n]|[\032\r]|[\r\n]|[\r])+$//;
|
||||
|
||||
Log3 $name, 5,
|
||||
"ONKYO_AVR $name: Unexpected start/destination: expected '!1', got '$sd'"
|
||||
|
Loading…
Reference in New Issue
Block a user