mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
initialisation bug fix
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3923 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b35274f202
commit
d41426fa45
@ -65,11 +65,12 @@ mailcheck_Define($$)
|
|||||||
$hash->{Folder} = "INBOX";
|
$hash->{Folder} = "INBOX";
|
||||||
$hash->{Folder} = $folder if( $folder );
|
$hash->{Folder} = $folder if( $folder );
|
||||||
|
|
||||||
if( $hash->{STATE} eq "???" ) {
|
if( $init_done ) {
|
||||||
$hash->{STATE} = "Initialized";
|
delete $modules{mailcheck}->{NotifyFn};
|
||||||
} elsif( $hash->{STATE} ne "???" ) {
|
|
||||||
mailcheck_Disconnect($hash);
|
mailcheck_Disconnect($hash);
|
||||||
mailcheck_Connect($hash);
|
mailcheck_Connect($hash);
|
||||||
|
} elsif( $hash->{STATE} ne "???" ) {
|
||||||
|
$hash->{STATE} = "Initialized";
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
@ -81,7 +82,7 @@ mailcheck_Notify($$)
|
|||||||
my ($hash,$dev) = @_;
|
my ($hash,$dev) = @_;
|
||||||
|
|
||||||
if( grep(m/^INITIALIZED$/, @{$dev->{CHANGED}}) ) {
|
if( grep(m/^INITIALIZED$/, @{$dev->{CHANGED}}) ) {
|
||||||
delete $hash->{NotifyFn};
|
delete $modules{mailcheck}->{NotifyFn};
|
||||||
|
|
||||||
mailcheck_Connect($hash);
|
mailcheck_Connect($hash);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user