mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-27 16:43:29 +00:00
SVG: accept def without CURRENT (for dblog)
git-svn-id: https://svn.fhem.de/fhem/trunk@3857 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f543beaa20
commit
19b9b06386
@ -64,13 +64,14 @@ SVG_Define($$)
|
||||
my ($hash, $def) = @_;
|
||||
my ($name, $type, $arg) = split("[ \t]+", $def, 3);
|
||||
|
||||
if(!$arg || $arg !~ m/^(.*):(.*):(.*)$/) {
|
||||
if(!$arg ||
|
||||
!($arg =~ m/^(.*):(.*):(.*)$/ || $arg =~ m/^(.*):(.*)$/)) {
|
||||
return "Usage: define <name> SVG <logdevice>:<gnuplot-file>:<logfile>";
|
||||
}
|
||||
|
||||
$hash->{LOGDEVICE} = $1;
|
||||
$hash->{GPLOTFILE} = $2;
|
||||
$hash->{LOGFILE} = $3;
|
||||
$hash->{LOGFILE} = ($3 ? $3 : "CURRENT");
|
||||
$hash->{STATE} = "initialized";
|
||||
|
||||
return undef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user