mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 18:56:03 +00:00
FHEMWEB: plotfork ist not hardcoded, checks for the FORKABLE FWEXT hash entry
git-svn-id: https://svn.fhem.de/fhem/trunk@6542 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e70e2872bf
commit
823c187ae3
@ -372,10 +372,14 @@ FW_Read($)
|
|||||||
|
|
||||||
$arg = "" if(!defined($arg));
|
$arg = "" if(!defined($arg));
|
||||||
Log3 $FW_wname, 4, "HTTP $name GET $arg";
|
Log3 $FW_wname, 4, "HTTP $name GET $arg";
|
||||||
|
$FW_ME = "/" . AttrVal($FW_wname, "webname", "fhem");
|
||||||
my $pid;
|
my $pid;
|
||||||
if(AttrVal($FW_wname, "plotfork", undef)) {
|
if(AttrVal($FW_wname, "plotfork", undef)) {
|
||||||
# Process SVG rendering as a parallel process
|
# Process SVG rendering as a parallel process
|
||||||
return if(($arg =~ m+/SVG_showLog+) && ($pid = fork));
|
my $p = $data{FWEXT};
|
||||||
|
if(grep { $p->{$_}{FORKABLE} && $arg =~ m+^$FW_ME$_+ } keys %{$p}) {
|
||||||
|
return if($pid = fork);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $cacheable = FW_answerCall($arg);
|
my $cacheable = FW_answerCall($arg);
|
||||||
@ -437,7 +441,6 @@ FW_answerCall($)
|
|||||||
|
|
||||||
$FW_RET = "";
|
$FW_RET = "";
|
||||||
$FW_RETTYPE = "text/html; charset=$FW_encoding";
|
$FW_RETTYPE = "text/html; charset=$FW_encoding";
|
||||||
$FW_ME = "/" . AttrVal($FW_wname, "webname", "fhem");
|
|
||||||
$FW_CSRF = ($defs{$FW_wname}{CSRFTOKEN} ?
|
$FW_CSRF = ($defs{$FW_wname}{CSRFTOKEN} ?
|
||||||
"&fwcsrf=".$defs{$FW_wname}{CSRFTOKEN} : "");
|
"&fwcsrf=".$defs{$FW_wname}{CSRFTOKEN} : "");
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ SVG_Initialize($)
|
|||||||
$hash->{FW_atPageEnd} = 1;
|
$hash->{FW_atPageEnd} = 1;
|
||||||
$data{FWEXT}{"/SVG_WriteGplot"}{CONTENTFUNC} = "SVG_WriteGplot";
|
$data{FWEXT}{"/SVG_WriteGplot"}{CONTENTFUNC} = "SVG_WriteGplot";
|
||||||
$data{FWEXT}{"/SVG_showLog"}{FUNC} = "SVG_showLog";
|
$data{FWEXT}{"/SVG_showLog"}{FUNC} = "SVG_showLog";
|
||||||
|
$data{FWEXT}{"/SVG_showLog"}{FORKABLE} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -2344,8 +2344,8 @@ CommandSetstate($$)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
# The timestamp is not the correct one, but we do not store a timestamp for
|
# The timestamp is not the correct one, but we do not store a timestamp
|
||||||
# this reading.
|
# for this reading.
|
||||||
my $tn = TimeNow();
|
my $tn = TimeNow();
|
||||||
$oldvalue{$sdev}{TIME} = $tn;
|
$oldvalue{$sdev}{TIME} = $tn;
|
||||||
$oldvalue{$sdev}{VAL} = ($init_done ? $d->{STATE} : $a[1]);
|
$oldvalue{$sdev}{VAL} = ($init_done ? $d->{STATE} : $a[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user