mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
00_MQTT2_SERVER.pm: report error if protoNum unknown (Forum #111338)
git-svn-id: https://svn.fhem.de/fhem/trunk@21977 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4f688f0926
commit
47efd25344
@ -304,6 +304,10 @@ MQTT2_SERVER_Read($@)
|
|||||||
$hash->{keepalive} = unpack('n', substr($pl, $off, 2)); $off += 2;
|
$hash->{keepalive} = unpack('n', substr($pl, $off, 2)); $off += 2;
|
||||||
($hash->{cid}, $off) = MQTT2_SERVER_getStr($hash, $pl, $off);
|
($hash->{cid}, $off) = MQTT2_SERVER_getStr($hash, $pl, $off);
|
||||||
|
|
||||||
|
if($hash->{protoNum} > 4) {
|
||||||
|
return MQTT2_SERVER_out($hash, pack("C*", 0x20, 2, 0, 1), $dump); # ERROR
|
||||||
|
}
|
||||||
|
|
||||||
my $desc = "keepAlive:$hash->{keepalive}";
|
my $desc = "keepAlive:$hash->{keepalive}";
|
||||||
if($hash->{cflags} & 0x04) { # Last Will & Testament
|
if($hash->{cflags} & 0x04) { # Last Will & Testament
|
||||||
my ($wt, $wm);
|
my ($wt, $wm);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user