2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 11:26:55 +00:00

10_FBDECT.pm: avoid simple fn-names (Forum #118303)

git-svn-id: https://svn.fhem.de/fhem/trunk@24300 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-04-21 18:33:20 +00:00
parent 2f5fb970b9
commit bc62ce16a8

View File

@ -448,7 +448,7 @@ FBDECT_ParseHttp($$$)
$omsg =~ s, ([a-z_]+?)="([^"]*)",$h{$1}=$2 if(!$h{$1}),ge; # Attributes $omsg =~ s, ([a-z_]+?)="([^"]*)",$h{$1}=$2 if(!$h{$1}),ge; # Attributes
if($h{lastpressedtimestamp}) { # Dect400/#94700, 440/#118303 if($h{lastpressedtimestamp}) { # Dect400/#94700, 440/#118303
sub dp { sub FBDECT_ParseTimestamp {
my ($txt,$h,$ln) = (@_); my ($txt,$h,$ln) = (@_);
$txt =~ s#<([^/\s>]+?)[^/]*?>(.*?)</\g1># $txt =~ s#<([^/\s>]+?)[^/]*?>(.*?)</\g1>#
my ($n,$c) = ($1,$2); my ($n,$c) = ($1,$2);
@ -456,10 +456,10 @@ FBDECT_ParseHttp($$$)
if($n eq "lastpressedtimestamp" && $ln) { if($n eq "lastpressedtimestamp" && $ln) {
$h->{"${n}_$ln"} = ($c =~ m/^\d{10}$/ ? FmtDateTime($c) : "N/A"); $h->{"${n}_$ln"} = ($c =~ m/^\d{10}$/ ? FmtDateTime($c) : "N/A");
} }
dp($c, $h) if($c && $c =~ m/^<.*>$/); FBDECT_ParseTimestamp($c, $h) if($c && $c =~ m/^<.*>$/);
#gex; #gex;
} }
dp($msg, \%h); FBDECT_ParseTimestamp($msg, \%h);
} }
my $ain = $h{identifier}; my $ain = $h{identifier};