Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 30, 2025
1 parent 8ddba38 commit 1d9ad0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/KDMqtt/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(options & CLEAN_SESSION) );
auto *client = new MosquittoClient(clientId, static_cast<bool>(options & CLEAN_SESSION));
m_mosquitto.init(client, this);

m_eventLoopHook.init(c_miscTaskInterval, this);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down Expand Up @@ -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<char *>(msg->payload), msg->payloadlen),
Expand Down
4 changes: 2 additions & 2 deletions src/KDMqtt/mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 1d9ad0b

Please sign in to comment.