-
This needed a separation: getting the current thread, and getting the thread of the client you're queueing a command for. This also resolves a circular reference between Client and ThreadData.
-
Instead of the thread data, which didn't make sense.
-
This makes much more sense than returning the amount of messages sent all the way up the call stack.
-
It tested the wrong thing. Tests still pass.
-
This allows easier saving of MQTT5 properties, for which a new file version for retained messages is created. It uses the packet parsing logic.
-
Because clients can now also exist as dummy objects, I had to add some extra checks. Also split up handlePublish() and the new parsePublishData().
-
Only mqtt3 though.
-
I need to decide what to do with getPublishData and that disabled test needs repurposing.
-
The behavior for MQTT3 clients in the same, but I replaced the term 'clean session' and described the behavior in MQTT5 terms, of 'clean start' and an expiry interval.
-
This is a preparation for MQTT5, because when there are receivers and publishers with different protocols, you can't always just write out the same packet. You can sometimes though, so that's what the copy factory determines.
-
This doesn't actually fix a real bug, just makes assumptions clear.
-
Because that's what's it is now. A lot of code can be refactored to get the settings from this now, but I'm not going to do that yet.
-
This entails making copies of the original packet when necessary, because QoS 0 doesn't have a packet id. I tried to keep it to an absolute minimum and do some precarious optmizations for it. There are tests though.
-
It caused really funky behavior. When a destructed client closed fd 0, eventfd() would give 0 back as fd. This would then later give errors.
-
Committing separately, because I want to be able to revert the fix I'm about to commit.
-
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.