diff --git a/CHANGED b/CHANGED index f9a74a72d..ccdccabc6 100644 --- a/CHANGED +++ b/CHANGED @@ -466,7 +466,7 @@ - bugfix: deleting at / watchdog while active creates an empty device - feature: ExactId trigger added for wildcard HMS devices -- =DATE= (4.6) +- 2009-07-03 (4.6) - bugfix: fht actuator message clarification by Klaus - feature: getstate command from Martin (25.12) - bugfix: at drifts for relative timespecs @@ -511,3 +511,6 @@ - feature: CUL shutdown procedure added - feature: 14_CUL_WS: better error checking - bugfix: webpgm2 multi line editing is working again + +- =DATE= (4.7) + - bugfix: Reattached corrupted CUL device caused uninitialized message diff --git a/fhem.pl b/fhem.pl index 9eb819be4..50a162ff9 100755 --- a/fhem.pl +++ b/fhem.pl @@ -151,7 +151,7 @@ my %defaultattr; # Default attributes my %intAt; # Internal at timer hash. my $nextat; # Time when next timer will be triggered. my $intAtCnt=0; -my $cvsid = '$Id: fhem.pl,v 1.74 2009-07-03 06:53:50 rudolfkoenig Exp $'; +my $cvsid = '$Id: fhem.pl,v 1.75 2009-07-04 10:09:27 rudolfkoenig Exp $'; my $namedef = "where is either:\n" . "- a single device name\n" . @@ -308,14 +308,20 @@ while (1) { ############################### # Message from the hardware (FHZ1000/WS3000/etc) via select or the Ready # Function. The latter ist needed for Windows, where USB devices are not - # reported by select. + # reported by select, but is used by unix too, to check if the device is + # attached again. foreach my $p (keys %selectlist) { CallFn($selectlist{$p}{NAME}, "ReadFn", $selectlist{$p}) if(vec($rout, $selectlist{$p}{FD}, 1)); } foreach my $p (keys %readyfnlist) { - CallFn($readyfnlist{$p}{NAME}, "ReadFn", $readyfnlist{$p}) - if(CallFn($readyfnlist{$p}{NAME}, "ReadyFn", $readyfnlist{$p})); + if(CallFn($readyfnlist{$p}{NAME}, "ReadyFn", $readyfnlist{$p})) { + + if($readyfnlist{$p}) { # ReadyFn may decide to delete the device + CallFn($readyfnlist{$p}{NAME}, "ReadFn", $readyfnlist{$p}); + } + + } } if(vec($rout, $server->fileno(), 1)) {