mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
00_MQTT2_CLIENT.pm: change separator from : to \0 (Forum #96608)
git-svn-id: https://svn.fhem.de/fhem/trunk@18462 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bc411a4917
commit
3f7eeb33ef
@ -340,10 +340,10 @@ MQTT2_CLIENT_Read($@)
|
||||
|
||||
if(!IsDisabled($name)) {
|
||||
$val = "" if(!defined($val));
|
||||
my $ac = AttrVal($name, "autocreate", undef) ? "autocreate:":"";
|
||||
my $ac = AttrVal($name, "autocreate", undef) ? "autocreate\0":"";
|
||||
my $cid = $hash->{clientId};
|
||||
$tp =~ s/:/_/g; # 96608
|
||||
Dispatch($hash, "$ac$cid:$tp:$val", undef, !$ac);
|
||||
Dispatch($hash, "$ac$cid\0$tp\0$val", undef, !$ac);
|
||||
|
||||
my $re = AttrVal($name, "rawEvents", undef);
|
||||
DoTrigger($name, "$tp:$val") if($re && $tp =~ m/$re/);
|
||||
|
@ -419,8 +419,8 @@ MQTT2_SERVER_doPublish($$$$;$)
|
||||
AttrVal($serverName, "rePublish", undef)) {
|
||||
$cid = $src->{NAME} if(!defined($cid));
|
||||
$cid =~ s,[^a-z0-9._],_,gi;
|
||||
my $ac = AttrVal($serverName, "autocreate", 1) ? "autocreate:":"";
|
||||
Dispatch($server, "$ac$cid:$tp:$val", undef, !$ac);
|
||||
my $ac = AttrVal($serverName, "autocreate", 1) ? "autocreate\0":"";
|
||||
Dispatch($server, "$ac$cid\0$tp\0$val", undef, !$ac);
|
||||
my $re = AttrVal($serverName, "rawEvents", undef);
|
||||
DoTrigger($server->{NAME}, "$tp:$val") if($re && $tp =~ m/$re/);
|
||||
}
|
||||
|
@ -90,12 +90,12 @@ MQTT2_DEVICE_Parse($$)
|
||||
}
|
||||
|
||||
my $autocreate;
|
||||
if($msg =~ m/^autocreate:(.*)$/s) {
|
||||
if($msg =~ m/^autocreate\0(.*)$/s) {
|
||||
$msg = $1;
|
||||
$autocreate = 1;
|
||||
}
|
||||
|
||||
my ($cid, $topic, $value) = split(":", $msg, 3);
|
||||
my ($cid, $topic, $value) = split("\0", $msg, 3);
|
||||
my $dp = $modules{MQTT2_DEVICE}{defptr}{re};
|
||||
foreach my $re (keys %{$dp}) {
|
||||
my $reAll = $re;
|
||||
|
Loading…
Reference in New Issue
Block a user