Skip to content

Commit

Permalink
MQTT: Respect FORTE's coding rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kumajaya authored and azoitl committed Feb 26, 2024
1 parent 0fade00 commit a7c8577
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/com/mqtt_paho/MQTTClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ int CMQTTClient::initClient() {
mClientConnectionOptions.context = this;

if ("" != gMqttClientConfigFile) { //file was provided
std::string mUsername;
std::string mPassword;
CMQTTClientConfigFileParser::MQTTConfigFromFile result = CMQTTClientConfigFileParser::MQTTConfigFromFile(mUsername, mPassword);
std::string username;
std::string password;
CMQTTClientConfigFileParser::MQTTConfigFromFile result = CMQTTClientConfigFileParser::MQTTConfigFromFile(username, password);
if (CMQTTClientConfigFileParser::loadConfig(gMqttClientConfigFile, mAddress, result)) {
mClientConnectionOptions.username = mUsername.c_str();
mClientConnectionOptions.password = mPassword.c_str();
mClientConnectionOptions.username = username.c_str();
mClientConnectionOptions.password = password.c_str();
} else {
return MQTTHandler::eWrongClientID;
}
Expand Down

0 comments on commit a7c8577

Please sign in to comment.