diff --git a/README.md b/README.md index 1fe015b..d40b6a7 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ For now, we don't support building mosquitto from source so you need to have it You can find setup instructions and download links at: https://mosquitto.org/download/ -You may also want to have a look at the [CI configuration](https://github.com/KDAB/KDUtils/blob/main/.github/workflows/build.yml) of this project to see which dependencies we use to build KDMqtt. +You may also want to have a look at the [CI configuration](https://github.com/KDAB/KDUtils/blob/main/.github/workflows/build.yml) of this project to see which dependencies we use to build KDMqtt. ## KDUtils/KDUtils diff --git a/src/KDMqtt/mqtt.cpp b/src/KDMqtt/mqtt.cpp index 5305a4c..78cbb76 100644 --- a/src/KDMqtt/mqtt.cpp +++ b/src/KDMqtt/mqtt.cpp @@ -109,7 +109,7 @@ MqttClient::MqttClient(const std::string &clientId, Options options) spdlog::error("MqttClient::MqttClient() - CTOR called before MqttLib::init(). Initialize lib before instantiating MqttClient object!"); } - auto *client = new MosquittoClient(clientId, static_cast(options & CLEAN_SESSION) ); + auto *client = new MosquittoClient(clientId, static_cast(options & CLEAN_SESSION)); m_mosquitto.init(client, this); m_eventLoopHook.init(c_miscTaskInterval, this); @@ -193,7 +193,7 @@ int MqttClient::connect(const Url &host, int port, int keepalive) // TODO -> TLS only works with connect(), it does not work with connect_async() // I'm uncertain if there is a setup that allows for connect_async() with TLS (I didn't manage to find one) // (the use of non-blocking connect_async() would be preferred from our POV) - // other people seem to have encountered similiar behaviour before, though this issue should have been fixed a while ago + // other people seem to have encountered similar behaviour before, though this issue should have been fixed a while ago // -> https://github.com/eclipse/mosquitto/issues/990 const auto start = clock(); const auto result = m_mosquitto.client()->connect(host.url().c_str(), port, keepalive); @@ -213,7 +213,7 @@ int MqttClient::disconnect() spdlog::debug("MqttClient::disconnect()"); if (connectionState.get() == ConnectionState::DISCONNECTING) { - spdlog::error("MqttClient::disconnect() - Already diconnecting from host."); + spdlog::error("MqttClient::disconnect() - Already disconnecting from host."); return MOSQ_ERR_UNKNOWN; } @@ -324,7 +324,7 @@ void MqttClient::onMessage(const mosquitto_message *msg) { spdlog::debug("MqttClient::onMessage() - message.id:{}, message.topic:{}", msg->mid, msg->topic); - Message message { + Message message{ .msgId = msg->mid, .topic = msg->topic, .payload = ByteArray(static_cast(msg->payload), msg->payloadlen), diff --git a/src/KDMqtt/mqtt.h b/src/KDMqtt/mqtt.h index 006f18a..daccb9f 100644 --- a/src/KDMqtt/mqtt.h +++ b/src/KDMqtt/mqtt.h @@ -31,7 +31,7 @@ constexpr int c_defaultKeepAliveSeconds = 60; /* * Class: IMqttLib * - * This is an abstract class specifing a generic + * This is an abstract class specifying a generic * interface exposed to application / business logic * to access MQTT library implementations. */ @@ -93,7 +93,7 @@ class KDMQTT_API MqttLib : public IMqttLib /* * Class: IMqttClient * - * This is an abstract class specifing a generic + * This is an abstract class specifying a generic * interface exposed to application / business logic * to access MQTT client implementations. */