mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
93_FHEM2FHEM.pm: avoid crash on startup (Forum #122977)
git-svn-id: https://svn.fhem.de/fhem/trunk@24980 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cacac63784
commit
3c24d904d9
@ -381,8 +381,9 @@ FHEM2FHEM_Set($@)
|
||||
FHEM2FHEM_CloseDev($hash);
|
||||
FHEM2FHEM_OpenDev($hash, 0);
|
||||
}
|
||||
|
||||
if($a[1] eq "cmd") {
|
||||
return "Not connected" if($hash->{STATE} ne "connected");
|
||||
return "Not connected" if(!$hash->{TCPDev});
|
||||
my $cmd = join(" ",@a[2..$#a]);
|
||||
$cmd = '{my $r=fhem("'.$cmd.'");; defined($r) ? "\\0$r\\0" : $r}'."\n";
|
||||
syswrite($hash->{TCPDev}, $cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user