-
pgroen/fix/ab257161 investigate When we delete our mqttclient instances (276 instances), sometimes we encounter a SEGFAULT originating in MqttClient::eventHandler. GDB always shows: 0x000055555576b4d5 in operator() (_closure=0x7ffea40023b0) at /source/mqtt-cpp/src/mqttclient.cpp:499. This is the line: principalClient->publishPending(); . principalClient pointer is not null, so the if-statement at 495 passes, but it is not a valid pointer. That is because the destructor already deleted that instance of principalClient (line 83, mprincipalClient.swap(principalClient); ). This is clearly indicated by this output: (gdb) p m_eventQueue.m_stop $1 = std::atomic = { true } That indicates the destructor has already executed line 87. This is caused by obtaining the classic pointer of m_principalClient at line 421, so principalClient is a reference which isn’t accounted for by the smart-pointer. See merge request !23
-
Activate Resubscribe only after a correct state-change [Bug] If connecting and subscribing to a retained message, the message was received twice. [Solution] Check for old and new state of the connection. Only call resubscribe when state changes from ::ConnectionFailure to ::Good. This prevents the calling of the re-subscribe in all other cases. Paho-C has the States defined, but not the state-transitions. See merge request !22
-
fix/pgroen/topic length limitation hasWildcard had an invalid check on the last character. When the topic size is 36 and we check the size>() -1 (35) it is interpreted as an '#' which in turn is a wildcard in the topic making sure it is not published. We now check the actual character of the last entry in the string. See merge request !21
-
5 mqttclient publish error See merge request !17
-
Queue is only correctly unloaded in onConnect. it does not seem to be unloaded on onFirstConnect, only when changing pushIncomingEvent. should investigate.
-
moved log.h to include and added log setters to mqttclient (default up to info ) See merge request !16
-
Merge Development to Master for version 0.9.7 See merge request !12
-
Fix/pgroen/deferred connection converted all logs to log.h format, except a few commented lines containing std::set params. <br> also made a number of syntax fixes and ran through the connection scenarios again, which are all working correctly now. See merge request !11