mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 11:26:55 +00:00
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
This commit is contained in:
parent
dd13ab6998
commit
6f143cb4cb
@ -129,7 +129,7 @@ MQTT2_CLIENT_doinit($)
|
|||||||
} elsif($hash->{connecting} == 2) {
|
} elsif($hash->{connecting} == 2) {
|
||||||
my $s = AttrVal($name, "subscriptions", "#");
|
my $s = AttrVal($name, "subscriptions", "#");
|
||||||
if($s eq "setByTheProgram") {
|
if($s eq "setByTheProgram") {
|
||||||
$s = ($hash->{".subscribe"} ? $hash->{".subscribe"} : "#");
|
$s = ($hash->{".subscriptions"} ? $hash->{".subscriptions"} : "#");
|
||||||
}
|
}
|
||||||
my $msg =
|
my $msg =
|
||||||
pack("n", $hash->{FD}). # packed Identifier
|
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
|
sub
|
||||||
MQTT2_CLIENT_doPublish($@)
|
MQTT2_CLIENT_doPublish($@)
|
||||||
{
|
{
|
||||||
@ -385,8 +385,8 @@ MQTT2_CLIENT_Write($$$)
|
|||||||
}
|
}
|
||||||
MQTT2_CLIENT_doPublish($hash, $topic, $msg, $retain);
|
MQTT2_CLIENT_doPublish($hash, $topic, $msg, $retain);
|
||||||
|
|
||||||
} elsif($function eq "subscribe") {
|
} elsif($function eq "subscriptions") {
|
||||||
$hash->{".subscribtion"} = $topicMsg;
|
$hash->{".subscriptions"} = $topicMsg;
|
||||||
MQTT2_CLIENT_Disco($hash);
|
MQTT2_CLIENT_Disco($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user