From f2daa036d4335266cf17d8f2f522ad86d3618a86 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 9 Nov 2025 22:04:49 -0500 Subject: [PATCH] feat: add logging for potential count fields in domain list reply handling --- src/OverteClient.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/OverteClient.cpp b/src/OverteClient.cpp index 69f5247..9337e5a 100644 --- a/src/OverteClient.cpp +++ b/src/OverteClient.cpp @@ -929,6 +929,16 @@ void OverteClient::handleDomainListReply(const char* data, size_t len) { } std::cout << std::endl; + // Check if this might be a count field (QDataStream format often starts with a count) + if (len - offset >= 4) { + uint32_t possibleCount = ntohl(*reinterpret_cast(data + offset)); + std::cout << "[OverteClient] First 4 bytes as uint32 (big-endian): " << possibleCount << std::endl; + } + if (len - offset >= 2) { + uint16_t possibleCount16 = ntohs(*reinterpret_cast(data + offset)); + std::cout << "[OverteClient] First 2 bytes as uint16 (big-endian): " << possibleCount16 << std::endl; + } + // Parse assignment client nodes from the packet // Each node is serialized using QDataStream format (see Node.cpp operator<<) // Format per node: