Commit 4bfae767a0741c0c22be95b6dd602a3b2ca3271f

Authored by Wiebe Cazemier
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 368 request_problem_information = !!readByte();
369 369 break;
370 370 case Mqtt5Properties::UserProperty:
  371 + {
  372 + const uint16_t len = readTwoBytesToUInt16();
  373 + readBytes(len);
  374 + const uint16_t len2 = readTwoBytesToUInt16();
  375 + readBytes(len2);
371 376 break;
  377 + }
372 378 case Mqtt5Properties::AuthenticationMethod:
  379 + {
  380 + const uint16_t len = readTwoBytesToUInt16();
  381 + readBytes(len);
373 382 break;
  383 + }
374 384 case Mqtt5Properties::AuthenticationData:
  385 + {
  386 + const uint16_t len = readTwoBytesToUInt16();
  387 + readBytes(len);
375 388 break;
  389 + }
376 390 default:
377 391 throw ProtocolError("Invalid connect property.");
378 392 }
... ... @@ -433,9 +447,19 @@ void MqttPacket::handleConnect()
433 447 break;
434 448 }
435 449 case Mqtt5Properties::CorrelationData:
  450 + {
  451 + const uint16_t len = readTwoBytesToUInt16();
  452 + readBytes(len);
436 453 break;
  454 + }
437 455 case Mqtt5Properties::UserProperty:
  456 + {
  457 + const uint16_t len = readTwoBytesToUInt16();
  458 + readBytes(len);
  459 + const uint16_t len2 = readTwoBytesToUInt16();
  460 + readBytes(len2);
438 461 break;
  462 + }
439 463 default:
440 464 throw ProtocolError("Invalid will property in connect.");
441 465 }
... ...