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

93_DbRep: internal code change, Forum: topic,105591.msg996089.html#msg996089

git-svn-id: https://svn.fhem.de/fhem/trunk@20571 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2019-11-24 19:17:33 +00:00
parent 922748f12e
commit 9fc72929bf
2 changed files with 49 additions and 63 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # Do not insert empty lines here, update check depends on it.
- change: 93_DbRep: internal code change,
Forum: topic,105591.msg996089.html#msg996089
- feature: 70_VIERA: crypted communication with new TVs (2019+) - feature: 70_VIERA: crypted communication with new TVs (2019+)
DEF of the devices changed (commandref) DEF of the devices changed (commandref)
reading power deleted, state => initialized/on/off reading power deleted, state => initialized/on/off

View File

@ -58,6 +58,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
# Version History intern # Version History intern
our %DbRep_vNotesIntern = ( our %DbRep_vNotesIntern = (
"8.30.2" => "24.11.2019 change order of delete(\$hash->{HELPER}{RUNNING_PID}) in *_ParseDone routines, Forum: https://forum.fhem.de/index.php/topic,105591.msg996089.html#msg996089 ",
"8.30.1" => "22.11.2019 commandref revised ", "8.30.1" => "22.11.2019 commandref revised ",
"8.30.0" => "14.11.2019 new command set adminCredentials and get storedCredentials, attribute useAdminCredentials ", "8.30.0" => "14.11.2019 new command set adminCredentials and get storedCredentials, attribute useAdminCredentials ",
"8.29.1" => "11.11.2019 commandref revised ", "8.29.1" => "11.11.2019 commandref revised ",
@ -1712,12 +1713,13 @@ sub DbRep_getInitDataDone($) {
my $dbloghash = $defs{$hash->{HELPER}{DBLOGDEVICE}}; my $dbloghash = $defs{$hash->{HELPER}{DBLOGDEVICE}};
my $dbconn = $dbloghash->{dbconn}; my $dbconn = $dbloghash->{dbconn};
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
readingsBeginUpdate($hash); readingsBeginUpdate($hash);
ReadingsBulkUpdateValue ($hash, "errortext", $err); ReadingsBulkUpdateValue ($hash, "errortext", $err);
ReadingsBulkUpdateValue ($hash, "state", "disconnected"); ReadingsBulkUpdateValue ($hash, "state", "disconnected");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
Log3 ($name, 2, "DbRep $name - DB connect failed. Make sure credentials of database $hash->{DATABASE} are valid and database is reachable."); Log3 ($name, 2, "DbRep $name - DB connect failed. Make sure credentials of database $hash->{DATABASE} are valid and database is reachable.");
} else { } else {
@ -1736,8 +1738,6 @@ sub DbRep_getInitDataDone($) {
$hash->{HELPER}{GRANTS} = $grants if($grants); $hash->{HELPER}{GRANTS} = $grants if($grants);
} }
delete($hash->{HELPER}{RUNNING_PID});
return if(!$fret); return if(!$fret);
return &$fret($hash,$opt,$prop); return &$fret($hash,$opt,$prop);
} }
@ -1749,6 +1749,8 @@ sub DbRep_getInitDataAborted(@) {
my ($hash,$cause) = @_; my ($hash,$cause) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
delete($hash->{HELPER}{RUNNING_PID});
$cause = $cause?$cause:"Timeout: process terminated"; $cause = $cause?$cause:"Timeout: process terminated";
Log3 ($name, 1, "DbRep $name -> BlockingCall $hash->{HELPER}{RUNNING_PID}{fn} pid:$hash->{HELPER}{RUNNING_PID}{pid} $cause"); Log3 ($name, 1, "DbRep $name -> BlockingCall $hash->{HELPER}{RUNNING_PID}{fn} pid:$hash->{HELPER}{RUNNING_PID}{pid} $cause");
@ -1757,7 +1759,6 @@ sub DbRep_getInitDataAborted(@) {
ReadingsBulkUpdateValue ($hash, "state", "disconnected"); ReadingsBulkUpdateValue ($hash, "state", "disconnected");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -2945,13 +2946,14 @@ sub averval_ParseDone($) {
my $reading_runtime_string; my $reading_runtime_string;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "$hash->{LASTCMD}"); $erread = DbRep_afterproc($hash, "$hash->{LASTCMD}");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -2996,8 +2998,6 @@ sub averval_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3132,10 +3132,11 @@ sub count_ParseDone($) {
my $table = $a[5]; my $table = $a[5];
my $reading_runtime_string; my $reading_runtime_string;
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3171,8 +3172,6 @@ sub count_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,"done"); ReadingsBulkUpdateTimeState($hash,$brt,$rt,"done");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3358,13 +3357,14 @@ sub maxval_ParseDone($) {
my $reading_runtime_string; my $reading_runtime_string;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "$hash->{LASTCMD}"); $erread = DbRep_afterproc($hash, "$hash->{LASTCMD}");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3402,8 +3402,6 @@ sub maxval_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3592,13 +3590,14 @@ sub minval_ParseDone($) {
my $reading_runtime_string; my $reading_runtime_string;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "$hash->{LASTCMD}"); $erread = DbRep_afterproc($hash, "$hash->{LASTCMD}");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3636,8 +3635,6 @@ sub minval_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3933,13 +3930,14 @@ sub diffval_ParseDone($) {
my $difflimit = AttrVal($name, "diffAccept", "20"); # legt fest, bis zu welchem Wert Differenzen akzeptoert werden (Ausreißer eliminieren)AttrVal($name, "diffAccept", "20"); my $difflimit = AttrVal($name, "diffAccept", "20"); # legt fest, bis zu welchem Wert Differenzen akzeptoert werden (Ausreißer eliminieren)AttrVal($name, "diffAccept", "20");
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "$hash->{LASTCMD}"); $erread = DbRep_afterproc($hash, "$hash->{LASTCMD}");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -3996,8 +3994,6 @@ sub diffval_ParseDone($) {
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4138,13 +4134,14 @@ sub sumval_ParseDone($) {
my $reading_runtime_string; my $reading_runtime_string;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "$hash->{LASTCMD}"); $erread = DbRep_afterproc($hash, "$hash->{LASTCMD}");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4177,8 +4174,6 @@ sub sumval_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4269,13 +4264,14 @@ sub del_ParseDone($) {
$reading =~ s/[^A-Za-z\/\d_\.-]/\//g; $reading =~ s/[^A-Za-z\/\d_\.-]/\//g;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "delEntries"); $erread = DbRep_afterproc($hash, "delEntries");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4303,8 +4299,6 @@ sub del_ParseDone($) {
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4417,10 +4411,11 @@ sub insert_Done($) {
my $i_value = delete $hash->{HELPER}{I_VALUE}; my $i_value = delete $hash->{HELPER}{I_VALUE};
my $i_unit = delete $hash->{HELPER}{I_UNIT}; my $i_unit = delete $hash->{HELPER}{I_UNIT};
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4437,8 +4432,6 @@ sub insert_Done($) {
Log3 ($name, 5, "DbRep $name - Inserted into database $hash->{DATABASE} table 'history': Timestamp: $i_timestamp, Device: $i_device, Type: $i_type, Event: $i_event, Reading: $i_reading, Value: $i_value, Unit: $i_unit"); Log3 ($name, 5, "DbRep $name - Inserted into database $hash->{DATABASE} table 'history': Timestamp: $i_timestamp, Device: $i_device, Type: $i_type, Event: $i_event, Reading: $i_reading, Value: $i_value, Unit: $i_unit");
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4569,10 +4562,11 @@ sub currentfillup_Done($) {
undef $device if ($device =~ m(^%$)); undef $device if ($device =~ m(^%$));
undef $reading if ($reading =~ m(^%$)); undef $reading if ($reading =~ m(^%$));
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4592,8 +4586,6 @@ sub currentfillup_Done($) {
Log3 ($name, 3, "DbRep $name - Table '$hash->{DATABASE}'.'current' filled up with rows: $rowstr"); Log3 ($name, 3, "DbRep $name - Table '$hash->{DATABASE}'.'current' filled up with rows: $rowstr");
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4895,13 +4887,14 @@ sub change_Done($) {
my $renmode = delete $hash->{HELPER}{RENMODE}; my $renmode = delete $hash->{HELPER}{RENMODE};
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
my $erread = DbRep_afterproc($hash, $renmode); my $erread = DbRep_afterproc($hash, $renmode);
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -4940,8 +4933,6 @@ sub change_Done($) {
Log3 ($name, 3, "DbRep ".(($hash->{ROLE} eq "Agent")?"Agent ":"")."$name - WARNING - old value \"$old\" not found in database \"$hash->{DATABASE}\" ") if($renmode eq "changeval"); Log3 ($name, 3, "DbRep ".(($hash->{ROLE} eq "Agent")?"Agent ":"")."$name - WARNING - old value \"$old\" not found in database \"$hash->{DATABASE}\" ") if($renmode eq "changeval");
} }
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5052,10 +5043,11 @@ sub fetchrows_ParseDone($) {
my @row; my @row;
my $reading_runtime_string; my $reading_runtime_string;
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5141,8 +5133,6 @@ sub fetchrows_ParseDone($) {
"<html>done - Warning: present rows exceed specified limit, adjust attribute <a href='https://fhem.de/commandref${sfx}.html#limit' target='_blank'>limit</a></html>":"done"); "<html>done - Warning: present rows exceed specified limit, adjust attribute <a href='https://fhem.de/commandref${sfx}.html#limit' target='_blank'>limit</a></html>":"done");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5536,10 +5526,11 @@ sub delseqdoubl_ParseDone($) {
my $reading_runtime_string; my $reading_runtime_string;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5583,7 +5574,6 @@ sub delseqdoubl_ParseDone($) {
"<html>done - Warning: not all items are shown, adjust attribute <a href='https://fhem.de/commandref${sfx}.html#limit' target='_blank'>limit</a> if you want see more</html>":"done"); "<html>done - Warning: not all items are shown, adjust attribute <a href='https://fhem.de/commandref${sfx}.html#limit' target='_blank'>limit</a> if you want see more</html>":"done");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5749,13 +5739,14 @@ sub expfile_ParseDone($) {
my $outfile = $a[6]; my $outfile = $a[6];
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "export"); $erread = DbRep_afterproc($hash, "export");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5772,8 +5763,6 @@ sub expfile_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5948,13 +5937,14 @@ sub impfile_PushDone($) {
my $infile = $a[4]; my $infile = $a[4];
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "import"); $erread = DbRep_afterproc($hash, "import");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -5971,8 +5961,6 @@ sub impfile_PushDone($) {
Log3 ($name, 3, "DbRep $name - Number of imported datasets to $hash->{DATABASE} from file $infile: $irowdone"); Log3 ($name, 3, "DbRep $name - Number of imported datasets to $hash->{DATABASE} from file $infile: $irowdone");
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -6159,13 +6147,14 @@ sub sqlCmd_ParseDone($) {
my $srs = AttrVal($name, "sqlResultFieldSep", "|"); my $srs = AttrVal($name, "sqlResultFieldSep", "|");
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "sqlCmd"); $erread = DbRep_afterproc($hash, "sqlCmd");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -6257,8 +6246,6 @@ sub sqlCmd_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -6480,10 +6467,11 @@ sub dbmeta_ParseDone($) {
my ($rt,$brt) = split(",", $bt); my ($rt,$brt) = split(",", $bt);
my $err = $a[4]?decode_base64($a[4]):undef; my $err = $a[4]?decode_base64($a[4]):undef;
delete($hash->{HELPER}{RUNNING_PID});
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -6511,10 +6499,6 @@ sub dbmeta_ParseDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,"done"); ReadingsBulkUpdateTimeState($hash,$brt,$rt,"done");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
# InternalTimer(time+0.5, "browser_refresh", $hash, 0);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -8450,13 +8434,14 @@ sub DbRep_syncStandbyDone($) {
my $err = $a[3]?decode_base64($a[3]):undef; my $err = $a[3]?decode_base64($a[3]):undef;
my $erread; my $erread;
delete($hash->{HELPER}{RUNNING_PID});
# Befehl nach Procedure ausführen # Befehl nach Procedure ausführen
$erread = DbRep_afterproc($hash, "syncStandby"); $erread = DbRep_afterproc($hash, "syncStandby");
if ($err) { if ($err) {
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1); ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
ReadingsSingleUpdateValue ($hash, "state", "error", 1); ReadingsSingleUpdateValue ($hash, "state", "error", 1);
delete($hash->{HELPER}{RUNNING_PID});
Log3 ($name, 4, "DbRep $name -> BlockingCall change_Done finished"); Log3 ($name, 4, "DbRep $name -> BlockingCall change_Done finished");
return; return;
} }
@ -8470,8 +8455,6 @@ sub DbRep_syncStandbyDone($) {
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state); ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }
@ -8939,6 +8922,8 @@ sub DbRep_ParseAborted(@) {
my $dbh = $hash->{DBH}; my $dbh = $hash->{DBH};
my $erread = ""; my $erread = "";
delete($hash->{HELPER}{RUNNING_PID});
$cause = $cause?$cause:"Timeout: process terminated"; $cause = $cause?$cause:"Timeout: process terminated";
Log3 ($name, 1, "DbRep $name -> BlockingCall $hash->{HELPER}{RUNNING_PID}{fn} pid:$hash->{HELPER}{RUNNING_PID}{pid} $cause"); Log3 ($name, 1, "DbRep $name -> BlockingCall $hash->{HELPER}{RUNNING_PID}{fn} pid:$hash->{HELPER}{RUNNING_PID}{pid} $cause");
@ -8953,7 +8938,6 @@ sub DbRep_ParseAborted(@) {
Log3 ($name, 2, "DbRep $name - Database command aborted due to \"$cause\" "); Log3 ($name, 2, "DbRep $name - Database command aborted due to \"$cause\" ");
delete($hash->{HELPER}{RUNNING_PID});
return; return;
} }