00_MQTT2_SERVER.pm: Fix # matching for Topics starting with /

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20131 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-09-08 10:17:37 +00:00
parent 187be351e5
commit 5a1a3b9002

View File

@ -451,6 +451,7 @@ MQTT2_SERVER_sendto($$$$)
$val = "" if(!defined($val));
foreach my $s (keys %{$hash->{subscriptions}}) {
my $re = $s;
$re =~ s,^#$,.*,g;
$re =~ s,/?#,\\b.*,g;
$re =~ s,\+,\\b[^/]+\\b,g;
if($topic =~ m/^$re$/) {