-
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.
-
This makes more sense, logically, and also helps in tests I'm about to write.
-
One fix is client destruction happening on the correct thread (when kicking another one off with existing client ID). This caused deadlocks on the subscriptions lock during a race condition when doKeepAliveCheck() also ran. A related deadlock was that the queued functions were executed while holding the lock taskQueueMutex. Together with the subscriptions lock, that was executed in the $SYS topic function, this also caused deadlocks.
-
One part is a fix, where the frame was advertised to be bigger than it was. The other change is making it possible to send chunks larger than the initial buffer size, by resizing the buffer (and resetting it later).
-
Mandatory normative statement MQTT-3.1.2-6.
-
Also fixes not downgrading QoS on subscribe.
-
My IDE didn't understand them for finding symbols, apparently.
-
Having threads creates instability for the fuzzer, and we don't need them.
-
This can be called by a fuzzer like afl-fuzz.
-
When sending many 0xFF, it would overflow. Found by using afl-fuzz.
-
This allows creation of multiple listeners, with different protocols and/or SSL certificates. Related change: settings is now a class that is copyable and assignable, and is done so to each thread on reload. Semi-related fix: fix crash in quit when multiple threads initiated it. This came to light when testing the auth plugin settings.
-
And fixed an assert in CirBuf.read().
-
The ping/pong is actually untested at this point, because Paho (my test client for now) doesn't do those. I wonder if any do, because MQTT already has ping/pong.
-
Also changed the disconnect reason a little: it now shows them all, so I don't have to worry about which one is more important.
-
And include some extra error conditions.
-
This includes a timer mechanism.
-
It also contains some related improvements that I needed: * Show disconnect reason * Fix the while condition for doing write() to avoid an unnecessary call * Config reloading logic
-
Also includes fixes to packet parsing that I couldn't make a separate commit for. When it comes to QoS 1, these things are still left, off the top of my head: - vector for qos queue? It helps with ordering and is CPU cache friendly. - Store subscription QoS. - Do retained messages have QoS? - Give session client's name, to access it later.
-
Also reloading of settings, which re-opens the log file.
-
The test cases give a bunch of warnings, but that's the COMPARE macro's fault. Let's see what to do...
-
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.