2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

vbs - problem fixed for "undef" messages in log

git-svn-id: https://svn.fhem.de/fhem/trunk@6118 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
bentele 2014-06-15 11:12:17 +00:00
parent b43fa3c8e9
commit eb44c57516

View File

@ -96,10 +96,12 @@ sub STV_Ready($)
elsif(!$hash->{CHILDPID}) {
return if($hash->{CHILDPID} = fork);
my $ppid = getppid();
### Copied from Blocking.pm
### Copied from Blocking.pm
foreach my $d (sort keys %defs) { # Close all kind of FD
my $h = $defs{$d};
#the following line was added by vbs to not close parent's DbLog DB handle
$h->{DBH}->{InactiveDestroy} = 1 if ($h->{TYPE} eq 'DbLog');
TcpServer_Close($h) if($h->{SERVERSOCKET});
if($h->{DeviceName}) {
require "$attr{global}{modpath}/FHEM/DevIo.pm";
@ -561,7 +563,7 @@ sub STV_Set($@)
return $hash->{".validcommands"};
}
if ($hash->{".validcommands"} =~ /$cmd/) {
if ((AttrVal($name, "setWhenOffline", undef) eq "ignore") and ($hash->{STATE} ne "opened")) {
if ((AttrVal($name, "setWhenOffline", "execute") eq "ignore") and ($hash->{STATE} ne "opened")) {
Log3 $name, 3, "[STV] Device seems offline. Set command ignored: $cmd";
return;
}