From ffcc68b5ef8f258ee2f60b9a4cd53fdd1d92e584 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 10 Aug 2018 16:09:21 +0000 Subject: [PATCH] 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 --- FHEM/00_MQTT2_SERVER.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/00_MQTT2_SERVER.pm b/FHEM/00_MQTT2_SERVER.pm index ae5a4cb8f..c7b33d44f 100644 --- a/FHEM/00_MQTT2_SERVER.pm +++ b/FHEM/00_MQTT2_SERVER.pm @@ -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;