mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-10-04 12:50:54 +02:00
Add re authentication tests
Summary: related to T12015 Reviewers: ivica Reviewed By: ivica Subscribers: miljen, iljazovic Differential Revision: https://repo.mireo.local/D27436
This commit is contained in:
@@ -82,7 +82,7 @@ inline std::string to_readable_packet(std::string packet) {
|
||||
|
||||
std::ostringstream stream;
|
||||
|
||||
if (code == control_code_e::connack || code == control_code_e::disconnect) {
|
||||
if (code == control_code_e::connack || code == control_code_e::auth) {
|
||||
stream << code_to_str(code);
|
||||
return stream.str();
|
||||
}
|
||||
@@ -99,6 +99,16 @@ inline std::string to_readable_packet(std::string packet) {
|
||||
stream << " props: " << to_readable_props(props);
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
if (code == control_code_e::disconnect) {
|
||||
auto disconnect = decoders::decode_disconnect(*varlen, begin);
|
||||
auto& [rc, props] = *disconnect;
|
||||
stream << code_to_str(code);
|
||||
stream << " rc: " << int(rc);
|
||||
stream << " reason string: " << props[prop::reason_string].value_or("");
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
if (code == control_code_e::publish) {
|
||||
auto publish = decoders::decode_publish(
|
||||
control_byte, *varlen, begin
|
||||
|
Reference in New Issue
Block a user