From 0d578f653a2992d7a7467539f8de2e1b5a77579c Mon Sep 17 00:00:00 2001 From: justme1968 Date: Fri, 13 Sep 2013 11:31:58 +0000 Subject: [PATCH] immediately disconnect/reconect on change of disable attribute git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@3901 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/32_mailcheck.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fhem/FHEM/32_mailcheck.pm b/fhem/FHEM/32_mailcheck.pm index d18a1ed2a..2f2c453a4 100755 --- a/fhem/FHEM/32_mailcheck.pm +++ b/fhem/FHEM/32_mailcheck.pm @@ -292,6 +292,15 @@ mailcheck_Attr($$$) $client->Debug_fh(*STDERR) if( $client ); } } + } elsif( $attrName eq "disable" ) { + my $hash = $defs{$name}; + if( $cmd eq "set" && $attrVal ne "0" ) { + mailcheck_Disconnect($hash); + } else { + $attr{$name}{$attrName} = 0; + mailcheck_Disconnect($hash); + mailcheck_Connect($hash); + } } if( $cmd eq "set" ) { @@ -417,6 +426,8 @@ mailcheck_Read($) if idle is supported the defailt is 600, without idle support the default is 60. the minimum is 60.
  • nossl
    1 -> don't use ssl.

  • +
  • disable
    + 1 -> disconnect and stop polling
  • debug
    1 -> enables debug output. default target is stdout.
  • logfile