mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-25 03:39:21 +00:00
10_CUL_HM: check send queue after each receive
git-svn-id: https://svn.fhem.de/fhem/trunk@7092 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
74f06556b1
commit
d93bad9251
@ -1043,6 +1043,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
}
|
||||
CUL_HM_pushEvnts();
|
||||
$defs{$_}{".noDispatchVars"} = 1 foreach (grep !/^$devH->{NAME}$/,@entities);
|
||||
CUL_HM_sndIfOpen("x:$ioName");
|
||||
return (CUL_HM_pushEvnts(),$name,@entities); #return something to please dispatcher
|
||||
}
|
||||
$shash->{lastMsg} = $msgX;
|
||||
@ -2253,6 +2254,8 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
Log3 $name,5,"CUL_HM $name sent ACK:".(int(@ack));
|
||||
}
|
||||
CUL_HM_ProcessCmdStack($shash) if ($respRemoved); # cont if complete
|
||||
CUL_HM_sndIfOpen(".x:".$ioName);
|
||||
|
||||
#------------ process events ------------------
|
||||
push @evtEt,[$shash,1,"noReceiver:src:$src ".$mFlg.$mTp." $p"]
|
||||
if(!@entities && !@evtEt);
|
||||
@ -5115,17 +5118,21 @@ sub CUL_HM_sndIfOpen($) {
|
||||
$modules{CUL_HM}{$io}{tmr} = 0;
|
||||
}
|
||||
else{
|
||||
InternalTimer(gettimeofday()+$IOpoll,"CUL_HM_sndIfOpen",
|
||||
if (@{$modules{CUL_HM}{$io}{pendDev}}){
|
||||
InternalTimer(gettimeofday()+$IOpoll,"CUL_HM_sndIfOpen",
|
||||
"sndIfOpen:$io", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$modules{CUL_HM}{$io}{tmr} = 0;
|
||||
my $name = shift(@{$modules{CUL_HM}{$io}{pendDev}});
|
||||
CUL_HM_ProcessCmdStack($defs{$name});
|
||||
if (@{$modules{CUL_HM}{$io}{pendDev}}){#tmr = 0, clearing queue slowly
|
||||
InternalTimer(gettimeofday()+$IOpoll,"CUL_HM_sndIfOpen",
|
||||
"sndIfOpen:$io", 0);
|
||||
if ($modules{CUL_HM}{$io}{pendDev} && @{$modules{CUL_HM}{$io}{pendDev}}){
|
||||
my $name = shift(@{$modules{CUL_HM}{$io}{pendDev}});
|
||||
CUL_HM_ProcessCmdStack($defs{$name});
|
||||
if (@{$modules{CUL_HM}{$io}{pendDev}}){#tmr = 0, clearing queue slowly
|
||||
InternalTimer(gettimeofday()+$IOpoll,"CUL_HM_sndIfOpen",
|
||||
"sndIfOpen:$io", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user