From 3a24e1273f57c20079904080db79ad92c86b4400 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Fri, 14 May 2010 12:19:31 +0000 Subject: [PATCH] Small fixes git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@628 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fhem.pl b/fhem.pl index 11b80b507..951c2955b 100755 --- a/fhem.pl +++ b/fhem.pl @@ -161,7 +161,7 @@ my $nextat; # Time when next timer will be triggered. my $intAtCnt=0; my %duplicate; # Pool of received msg for multi-fhz/cul setups my $duplidx=0; # helper for the above pool -my $cvsid = '$Id: fhem.pl,v 1.105 2010-04-02 16:26:58 rudolfkoenig Exp $'; +my $cvsid = '$Id: fhem.pl,v 1.106 2010-05-14 12:19:31 rudolfkoenig Exp $'; my $namedef = "where is either:\n" . "- a single device name\n" . @@ -495,8 +495,11 @@ IOWrite($@) my $dev = $hash->{NAME}; return if(IsDummy($dev) || IsIgnored($dev)); my $iohash = $hash->{IODev}; - if(!$iohash) { - Log 5, "No IO device found for $dev"; + if(!$iohash || + !$iohash->{TYPE} || + !$modules{$iohash->{TYPE}} || + !$modules{$iohash->{TYPE}}{WriteFn}) { + Log 5, "No IO device or WriteFn found for $dev"; return; } @@ -767,9 +770,9 @@ OpenLogfile($) } else { + HandleArchiving($defs{global}); $defs{global}{currentlogfile} = $param; $defs{global}{logfile} = $attr{global}{logfile}; - HandleArchiving($defs{global}); open(LOG, ">>$currlogfile") || return("Can't open $currlogfile: $!"); # Redirect stdin/stderr