2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

16_STACKABLE.pm: append to PARTIAL if present (Forum #57806)

git-svn-id: https://svn.fhem.de/fhem/trunk@14017 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-04-17 16:05:29 +00:00
parent 00f09f2ba7
commit b74436f96b

View File

@ -125,6 +125,10 @@ STACKABLE_IOReadFn($) # used by synchronuous get
my ($hash) = @_;
my $me = $hash->{IODev};
my $buf = "";
if($me->{IODev} && $me->{IODev}{PARTIAL}) {
$buf = $me->{IODev}{PARTIAL};
$me->{IODev}{PARTIAL} = "";
}
while($buf !~ m/\n/) {
$buf .= DevIo_SimpleRead($me->{IODev}); # may block
}