From 86b66d864a47005d95e0936cb2f055d9900dec80 Mon Sep 17 00:00:00 2001 From: martinp876 Date: Mon, 9 Sep 2013 20:33:29 +0000 Subject: [PATCH] correct CUL interworking - initialized git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@3886 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 68870cf67..4209aec99 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -3070,7 +3070,7 @@ sub CUL_HM_sndIfOpen($) { my(undef,$io) = split(':',$_[0]); RemoveInternalTimer("sndIfOpen:$io");# should not be necessary, but my $ioHash = $defs{$io}; - if ( $ioHash->{STATE} ne "opened" + if ( $ioHash->{STATE} != m/^(opened|Initialized)$/ ||(defined $ioHash->{XmitOpen} && $ioHash->{XmitOpen} == 0) # ||$modules{CUL_HM}{prot}{rspPend}>=$maxPendCmds ){#still no send allowed @@ -3105,9 +3105,9 @@ sub CUL_HM_SndCmd($$) { my $io = $hash->{IODev}; return if(!$io); my $ioName = $io->{NAME}; - if ((hex substr($cmd,2,2) & 0x20) && ( # check for commands with resp-req - $io->{STATE} ne "opened" # we need to queue - || $modules{CUL_HM}{$ioName}{tmr} # queue already running + if ((hex substr($cmd,2,2) & 0x20) && ( # check for commands with resp-req + $io->{STATE} != m/^(opened|Initialized)$/ # we need to queue + || $modules{CUL_HM}{$ioName}{tmr} # queue already running ||(defined $io->{XmitOpen} && $io->{XmitOpen} == 0)#overload, dont send # ||$modules{CUL_HM}{prot}{rspPend}>=$maxPendCmds )