Commit 4bfae767a0741c0c22be95b6dd602a3b2ca3271f
1 parent
cdd77c7d
Dummy property handling in handleConnect
Showing
1 changed file
with
24 additions
and
0 deletions
mqttpacket.cpp
| @@ -368,11 +368,25 @@ void MqttPacket::handleConnect() | @@ -368,11 +368,25 @@ void MqttPacket::handleConnect() | ||
| 368 | request_problem_information = !!readByte(); | 368 | request_problem_information = !!readByte(); |
| 369 | break; | 369 | break; |
| 370 | case Mqtt5Properties::UserProperty: | 370 | case Mqtt5Properties::UserProperty: |
| 371 | + { | ||
| 372 | + const uint16_t len = readTwoBytesToUInt16(); | ||
| 373 | + readBytes(len); | ||
| 374 | + const uint16_t len2 = readTwoBytesToUInt16(); | ||
| 375 | + readBytes(len2); | ||
| 371 | break; | 376 | break; |
| 377 | + } | ||
| 372 | case Mqtt5Properties::AuthenticationMethod: | 378 | case Mqtt5Properties::AuthenticationMethod: |
| 379 | + { | ||
| 380 | + const uint16_t len = readTwoBytesToUInt16(); | ||
| 381 | + readBytes(len); | ||
| 373 | break; | 382 | break; |
| 383 | + } | ||
| 374 | case Mqtt5Properties::AuthenticationData: | 384 | case Mqtt5Properties::AuthenticationData: |
| 385 | + { | ||
| 386 | + const uint16_t len = readTwoBytesToUInt16(); | ||
| 387 | + readBytes(len); | ||
| 375 | break; | 388 | break; |
| 389 | + } | ||
| 376 | default: | 390 | default: |
| 377 | throw ProtocolError("Invalid connect property."); | 391 | throw ProtocolError("Invalid connect property."); |
| 378 | } | 392 | } |
| @@ -433,9 +447,19 @@ void MqttPacket::handleConnect() | @@ -433,9 +447,19 @@ void MqttPacket::handleConnect() | ||
| 433 | break; | 447 | break; |
| 434 | } | 448 | } |
| 435 | case Mqtt5Properties::CorrelationData: | 449 | case Mqtt5Properties::CorrelationData: |
| 450 | + { | ||
| 451 | + const uint16_t len = readTwoBytesToUInt16(); | ||
| 452 | + readBytes(len); | ||
| 436 | break; | 453 | break; |
| 454 | + } | ||
| 437 | case Mqtt5Properties::UserProperty: | 455 | case Mqtt5Properties::UserProperty: |
| 456 | + { | ||
| 457 | + const uint16_t len = readTwoBytesToUInt16(); | ||
| 458 | + readBytes(len); | ||
| 459 | + const uint16_t len2 = readTwoBytesToUInt16(); | ||
| 460 | + readBytes(len2); | ||
| 438 | break; | 461 | break; |
| 462 | + } | ||
| 439 | default: | 463 | default: |
| 440 | throw ProtocolError("Invalid will property in connect."); | 464 | throw ProtocolError("Invalid will property in connect."); |
| 441 | } | 465 | } |