mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
long buffer correct
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1304 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fa2cfee189
commit
96834c7f16
@ -290,7 +290,7 @@ RFXCOM_Read($)
|
|||||||
#Log 1, "RFXCOM: RFXCOM_Read '$hexline'";
|
#Log 1, "RFXCOM: RFXCOM_Read '$hexline'";
|
||||||
|
|
||||||
# first char as byte represents number of bits of the message
|
# first char as byte represents number of bits of the message
|
||||||
my $bits = ord($rfxcom_data);
|
my $bits = ord(substr($rfxcom_data,0,1));
|
||||||
my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
|
my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
|
||||||
|
|
||||||
while(length($rfxcom_data) > $num_bytes) {
|
while(length($rfxcom_data) > $num_bytes) {
|
||||||
@ -304,6 +304,8 @@ RFXCOM_Read($)
|
|||||||
#Log 1, "RFXCOM_Read rfxcom_data '$hexline'";
|
#Log 1, "RFXCOM_Read rfxcom_data '$hexline'";
|
||||||
#
|
#
|
||||||
RFXCOM_Parse($hash, $hash, $name, $rmsg);
|
RFXCOM_Parse($hash, $hash, $name, $rmsg);
|
||||||
|
$bits = ord(substr($rfxcom_data,0,1));
|
||||||
|
$num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
|
||||||
}
|
}
|
||||||
#Log 1, "RFXCOM_Read END";
|
#Log 1, "RFXCOM_Read END";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user