mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 00:48:53 +00:00
fhem.pl: add optional parameter to WriteStatefile (Forum #123764)
git-svn-id: https://svn.fhem.de/fhem/trunk@25156 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8201991147
commit
5ac7cddd40
@ -101,7 +101,7 @@ sub SemicolonEscape($);
|
|||||||
sub SignalHandling();
|
sub SignalHandling();
|
||||||
sub TimeNow();
|
sub TimeNow();
|
||||||
sub Value($);
|
sub Value($);
|
||||||
sub WriteStatefile();
|
sub WriteStatefile(;$);
|
||||||
sub XmlEscape($);
|
sub XmlEscape($);
|
||||||
sub addEvent($$;$);
|
sub addEvent($$;$);
|
||||||
sub addToDevAttrList($$;$);
|
sub addToDevAttrList($$;$);
|
||||||
@ -1593,13 +1593,14 @@ GetAllReadings($)
|
|||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
sub
|
sub
|
||||||
WriteStatefile()
|
WriteStatefile(;$)
|
||||||
{
|
{
|
||||||
if(configDBUsed()) {
|
if(configDBUsed()) {
|
||||||
return cfgDB_SaveState();
|
return cfgDB_SaveState();
|
||||||
}
|
}
|
||||||
|
|
||||||
my $stateFile = AttrVal('global','statefile',undef);
|
my $stateFile = AttrVal('global','statefile',undef);
|
||||||
|
$stateFile = $_[0] if($_[0]); #123764
|
||||||
return "No statefile specified" if(!defined($stateFile));
|
return "No statefile specified" if(!defined($stateFile));
|
||||||
|
|
||||||
my $now = gettimeofday();
|
my $now = gettimeofday();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user