2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 01:14:19 +00:00

00_MQTT2_CLIENT.pm: send retain flag in publish (Forum #95447)

git-svn-id: https://svn.fhem.de/fhem/trunk@18167 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-01-07 08:26:35 +00:00
parent 62e6e520b2
commit 7506d100fc

View File

@ -364,7 +364,7 @@ MQTT2_CLIENT_doPublish($@)
my $name = $hash->{NAME};
return if(IsDisabled($name));
$val = "" if(!defined($val));
my $msg = pack("C",0x30).
my $msg = pack("C", $retain ? 0x31:0x30).
MQTT2_CLIENT_calcRemainingLength(2+length($topic)+length($val)).
pack("n", length($topic)).
$topic.$val;