From 6f143cb4cbcbeaf25203bcccdab8499e0f53a996 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 21 Nov 2018 07:23:21 +0000 Subject: [PATCH] 00_MQTT2_CLIENT.pm: fix subscriptions bug used by MQTT_GENERIC_BRIDGE (Forum #93255) git-svn-id: https://svn.fhem.de/fhem/trunk@17804 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_MQTT2_CLIENT.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/00_MQTT2_CLIENT.pm b/fhem/FHEM/00_MQTT2_CLIENT.pm index 57fee2614..6fe9289b6 100644 --- a/fhem/FHEM/00_MQTT2_CLIENT.pm +++ b/fhem/FHEM/00_MQTT2_CLIENT.pm @@ -129,7 +129,7 @@ MQTT2_CLIENT_doinit($) } elsif($hash->{connecting} == 2) { my $s = AttrVal($name, "subscriptions", "#"); if($s eq "setByTheProgram") { - $s = ($hash->{".subscribe"} ? $hash->{".subscribe"} : "#"); + $s = ($hash->{".subscriptions"} ? $hash->{".subscriptions"} : "#"); } my $msg = pack("n", $hash->{FD}). # packed Identifier @@ -350,7 +350,7 @@ MQTT2_CLIENT_Read($@) } ###################################### -# send topic to client if its subscription matches the topic +# send topic to client if its subscriptions matches the topic sub MQTT2_CLIENT_doPublish($@) { @@ -385,8 +385,8 @@ MQTT2_CLIENT_Write($$$) } MQTT2_CLIENT_doPublish($hash, $topic, $msg, $retain); - } elsif($function eq "subscribe") { - $hash->{".subscribtion"} = $topicMsg; + } elsif($function eq "subscriptions") { + $hash->{".subscriptions"} = $topicMsg; MQTT2_CLIENT_Disco($hash); } else {