2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

initialisation bug fix

git-svn-id: https://svn.fhem.de/fhem/trunk@3923 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2013-09-18 23:16:45 +00:00
parent a1beda9398
commit a802825eda

View File

@ -65,11 +65,12 @@ mailcheck_Define($$)
$hash->{Folder} = "INBOX";
$hash->{Folder} = $folder if( $folder );
if( $hash->{STATE} eq "???" ) {
$hash->{STATE} = "Initialized";
} elsif( $hash->{STATE} ne "???" ) {
if( $init_done ) {
delete $modules{mailcheck}->{NotifyFn};
mailcheck_Disconnect($hash);
mailcheck_Connect($hash);
} elsif( $hash->{STATE} ne "???" ) {
$hash->{STATE} = "Initialized";
}
return undef;
@ -81,7 +82,7 @@ mailcheck_Notify($$)
my ($hash,$dev) = @_;
if( grep(m/^INITIALIZED$/, @{$dev->{CHANGED}}) ) {
delete $hash->{NotifyFn};
delete $modules{mailcheck}->{NotifyFn};
mailcheck_Connect($hash);
}