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:
parent
a1beda9398
commit
a802825eda
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user