-
There were bugs in which authentication object was used when, causing threadings bugs. Instead of getting from the 'sender', we can just store a thread local pointer.
-
Files are simple serialized bytes prefaced by lengths. File is hashed to verify integrity. This was also a good way preventing unexpected errors when trying to crash the parser by having it load a different file. This change includes some refactoring that was necessary: - It 'fixes' looking at the wrong thread's authentiction. This is still wrong though. It will be fixed by a thread local pointer in the next commit. - Deadlocks with yourself are handled in rwlockguard. - QoSPacketQueue is now a class. - Probably other tweaks.
-
It didn't clean up the old ones, causing unpredictable problems.
-
Three parts to it: - Start the app fresh per test. This avoids annoyances like getting retained messages on subscribe, messing up the test. - Waiting for suback was apparently necessary. - Because the Qt event loop was given time, waiting for publishes was sometimes pointless because it had already arrived. So, checking the receive list first.
-
Also include a few stats.
-
Shifting signed integers is undefined and only sometimes produced unexpected results. Was detected in packet identifiers in QoS testing.
-
Instead of getting it from the sender of a packet. Sometimes there was no sender. This fixes a crash on retained messages, because those newly created packets didn't have a sender to get the threaddata from. So, using a special object for it is easier and more robust.
-
The MQTT docs showed a wrong condition for checking malformed packets. And, we have to grow buffers to MAX_PACKET_SIZE, otherwise we can't process. I still have some inteligent buffer shrink logic in mind.
-
There still is a bug: writing a very big packet. I wrote the test case already.