mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
00_MQTT2_SERVER.pm: fixing perl-5.26 errors (Forum #90145)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17120 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4194020a62
commit
ffcc68b5ef
@ -72,7 +72,7 @@ MQTT2_SERVER_keepaliveChecker($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
my $now = gettimeofday();
|
||||
foreach my $clName (keys $hash->{clients}) {
|
||||
foreach my $clName (keys %{$hash->{clients}}) {
|
||||
my $cHash = $defs{$clName};
|
||||
next if(!$cHash || !$cHash->{keepalive} ||
|
||||
$now < $cHash->{lastMsgTime}+$cHash->{keepalive}*1.5 );
|
||||
@ -335,7 +335,7 @@ MQTT2_SERVER_doPublish($$$;$$)
|
||||
$hash->{retain}{$tp} = \%h;
|
||||
}
|
||||
|
||||
foreach my $clName (keys $hash->{clients}) {
|
||||
foreach my $clName (keys %{$hash->{clients}}) {
|
||||
MQTT2_SERVER_sendto($defs{$clName}, $tp, $val) if(!$src || $src ne $clName);
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ MQTT2_SERVER_sendto($$$)
|
||||
my ($hash, $topic, $val) = @_;
|
||||
return if(IsDisabled($hash->{NAME}));
|
||||
$val = "" if(!defined($val));
|
||||
foreach my $s (keys $hash->{subscriptions}) {
|
||||
foreach my $s (keys %{$hash->{subscriptions}}) {
|
||||
my $re = $s;
|
||||
$re =~ s,/?#,\\b.*,g;
|
||||
$re =~ s,\+,\\b[^/]+\\b,g;
|
||||
|
Loading…
x
Reference in New Issue
Block a user