2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

98_serviced: fixed serviceAutostop triggered even if device is disabled - fixed svn commit user failure

git-svn-id: https://svn.fhem.de/fhem/trunk@27226 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
deespe 2023-02-14 17:06:12 +00:00
parent 30221f109a
commit ec2ed32d9e
3 changed files with 24 additions and 31 deletions

View File

@ -1,6 +1,5 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 98_serviced: serviceAutostop triggered even if device is disabled
- change: 50_TelegramBot: new reading msgDate and corrections
- feature: 72_FRITZBOX: Attr. enableWanInfo -> enableWLANneighbors
Attr. wlanNeighborsPrefix

View File

@ -16,7 +16,7 @@ use Blocking;
use Time::HiRes;
use vars qw{%defs};
my $servicedVersion = "1.2.9";
my $servicedVersion = "1.2.8";
sub serviced_shutdownwait($);
@ -403,7 +403,6 @@ sub serviced_Shutdown($)
my ($hash) = @_;
my $name = $hash->{NAME};
my $autostop = AttrNum($name,"serviceAutostop",0);
return if (IsDisabled($name));
$autostop = $autostop > 300 ? 300 : $autostop;
if ($autostop)
{

View File

@ -38,8 +38,8 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
# Version History intern by DS_Starter:
my %DbLog_vNotesIntern = (
"5.8.1" => "13.02.2023 change field type of DbLogInclude, DbLogExclude to textField-long, configCheck evaluate collation ".
"_DbLog_SBP_connectDB evaluate DB Character/collation set and use it for connection collation ",
"5.8.1" => "13.02.2023 change field type of DbLogInclude, DbLogExclude to textField-long, ".
"_DbLog_SBP_connectDB evaluate DB Character set and use it for connection collation ",
"5.8.0" => "30.01.2023 new Get menu for a selection of getters, fix creation of new subprocess during shutdown sequence ",
"5.7.0" => "25.01.2023 send Log3() data back ro parent process, improve _DbLog_dbReadings function ",
"5.6.2" => "22.01.2023 check Syntax of DbLogValueFn attribute with Log output, Forum:#131777 ",
@ -2602,7 +2602,25 @@ sub _DbLog_SBP_connectDB {
if($utf8) {
if($model eq "MYSQL") {
$dbh->{mysql_enable_utf8} = 1;
$dbh->{mysql_enable_utf8} = 1;
($err, my @se) = _DbLog_prepExecQueryOnly ($name, $dbh, "SHOW VARIABLES LIKE 'character_set_database';");
return ($err, q{}) if($err);
my $dbcharset = @se ? uc($se[1]) : "no result";
_DbLog_SBP_Log3Parent ( { name => $name,
level => 4,
msg => qq(Database Character set is >$dbcharset<),
oper => 'log3parent',
subprocess => $subprocess
}
);
$dbcharset = 'UTF8' if($dbcharset !~ /UTF8MB4/xs);
($err, undef) = _DbLog_SBP_dbhDo ($name, $dbh, qq(set names "$dbcharset"), $subprocess);
return ($err, q{}) if($err);
}
if($model eq "SQLITE") {
@ -2610,29 +2628,6 @@ sub _DbLog_SBP_connectDB {
return ($err, q{}) if($err);
}
}
if ($model eq "MYSQL") {
($err, my @se) = _DbLog_prepExecQueryOnly ($name, $dbh, "SHOW VARIABLES LIKE 'collation_database'");
return ($err, q{}) if($err);
my $dbcharset = @se ? $se[1] : 'noresult';
_DbLog_SBP_Log3Parent ( { name => $name,
level => 4,
msg => qq(Database Character set is >$dbcharset<),
oper => 'log3parent',
subprocess => $subprocess
}
);
if ($dbcharset !~ /noresult|ucs2|utf16|utf32/ixs) { # Impermissible Client Character Sets -> https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html
my $collation = $dbcharset;
$dbcharset = (split '_', $collation, 2)[0];
($err, undef) = _DbLog_SBP_dbhDo ($name, $dbh, qq(set names "$dbcharset" collate "$collation"), $subprocess); # set names utf8 collate utf8_general_ci
return ($err, q{}) if($err);
}
}
if ($model eq 'SQLITE') {
my @dos = ("PRAGMA temp_store=MEMORY",
@ -7112,10 +7107,10 @@ sub DbLog_configcheck {
my ($chutf8mod,$chutf8dat);
if ($dbmodel =~ /MYSQL/) {
($err, @ce) = _DbLog_prepExecQueryOnly ($name, $dbh, qq(SHOW VARIABLES LIKE 'collation_connection')); # character_set_connection
($err, @ce) = _DbLog_prepExecQueryOnly ($name, $dbh, "SHOW VARIABLES LIKE 'character_set_connection'");
$chutf8mod = @ce ? uc($ce[1]) : "no result";
($err, @se) = _DbLog_prepExecQueryOnly ($name, $dbh, qq(SHOW VARIABLES LIKE 'collation_database')); # character_set_database
($err, @se) = _DbLog_prepExecQueryOnly ($name, $dbh, "SHOW VARIABLES LIKE 'character_set_database'");
$chutf8dat = @se ? uc($se[1]) : "no result";
if($chutf8mod eq $chutf8dat) {