2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

00_ZWDongle.pm: remove data from sendstack only if the right msg is acked (Forum #52364)

git-svn-id: https://svn.fhem.de/fhem/trunk@11282 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-04-18 19:13:17 +00:00
parent 20cffadd45
commit 0242317464

View File

@ -401,9 +401,9 @@ ZWDongle_Write($$$)
}
sub
ZWDongle_shiftSendStack($$$$)
ZWDongle_shiftSendStack($$$$;$)
{
my ($hash, $reason, $loglevel, $txt) = @_;
my ($hash, $reason, $loglevel, $txt, $cbId) = @_;
my $ss = $hash->{SendStack};
my $cmd = $ss->[0];
@ -413,6 +413,7 @@ ZWDongle_shiftSendStack($$$$)
$hash->{WaitForAck}=2;
} else {
return if($cbId && $cmd && $cbId ne substr($cmd,-4,2));
shift @{$ss};
Log3 $hash, $loglevel, "$txt, removing $cmd from dongle sendstack"
if($txt && $cmd);
@ -563,8 +564,8 @@ ZWDongle_Read($@)
Log3 $name, 4, "ZWDongle_Read $name: rcvd $msg ($ztp $zfi), sending ACK";
DevIo_SimpleWrite($hash, "06", 1);
ZWDongle_shiftSendStack($hash, 1, 5, "device ack reveived")
if($msg =~ m/^0013/);
ZWDongle_shiftSendStack($hash, 1, 5, "device ack reveived", $1)
if($msg =~ m/^0013(..)/);
last if(defined($local) && (!defined($regexp) || ($msg =~ m/$regexp/)));
$hash->{PARTIAL} = $data; # Recursive call by ZWave get, Forum #37418