mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
00_MQTT2_SERVER.pm: Dispatch LWT (Forum #90145)
git-svn-id: https://svn.fhem.de/fhem/trunk@17173 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c27c176d4
commit
39d19300ff
@ -102,7 +102,7 @@ MQTT2_SERVER_Undef($@)
|
||||
|
||||
if($hash->{lwt}) { # Last will
|
||||
my ($tp, $val) = split(':', $hash->{lwt}, 2);
|
||||
MQTT2_SERVER_doPublish($shash, $shash, $tp, $val, $hash->{cflags} & 0x20);
|
||||
MQTT2_SERVER_doPublish($hash, $shash, $tp, $val, $hash->{cflags} & 0x20);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
@ -346,6 +346,7 @@ MQTT2_SERVER_Read($@)
|
||||
|
||||
######################################
|
||||
# Call sendto for all clients + Dispatch + dotrigger if rawEvents is set
|
||||
# tgt is the "accept" server, src is the connection generating the data
|
||||
sub
|
||||
MQTT2_SERVER_doPublish($$$$;$)
|
||||
{
|
||||
@ -363,7 +364,7 @@ MQTT2_SERVER_doPublish($$$$;$)
|
||||
MQTT2_SERVER_sendto($defs{$clName}, $tp, $val) if($src->{NAME} ne $clName);
|
||||
}
|
||||
|
||||
if($src->{cid}) { # "real" MQTT client
|
||||
if(defined($src->{cid})) { # "real" MQTT client
|
||||
my $cid = $src->{cid};
|
||||
$cid =~ s,[^a-z0-9._],_,gi;
|
||||
my $ac = AttrVal($tgt->{NAME}, "autocreate", undef) ? "autocreate:":"";
|
||||
|
Loading…
x
Reference in New Issue
Block a user