diff --git a/src/clientpaho.cpp b/src/clientpaho.cpp index 31026e6..24e6239 100644 --- a/src/clientpaho.cpp +++ b/src/clientpaho.cpp @@ -669,7 +669,7 @@ std::int32_t ClientPaho::publishInternal( const MqttMessage& message, int qos ) // the insertion of the token into the pending operations. // OSDEV_COMPONENTS_LOCKGUARD(m_mutex); - auto rc = MQTTAsync_sendMessage(m_client, message.topic().c_str(), &msg, &opts); + auto rc = MQTTAsync_sendMessage( m_client, message.topic().c_str(), &msg, &opts ); if( MQTTASYNC_SUCCESS != rc ) { LogDebug( "[ClientPaho::publishInterval]", std::string( m_clientId + " - publish on topic " + message.topic() + " failed with code " + pahoAsyncErrorCodeToString( rc ) ) ); @@ -693,7 +693,7 @@ std::int32_t ClientPaho::subscribeInternal( const std::string& topic, int qos ) // Need to lock the mutex because it is possible that the callback is faster than // the insertion of the token into the pending operations. OSDEV_COMPONENTS_LOCKGUARD(m_mutex); - auto rc = MQTTAsync_subscribe(m_client, topic.c_str(), qos, &opts); + auto rc = MQTTAsync_subscribe( m_client, topic.c_str(), qos, &opts ); if (MQTTASYNC_SUCCESS != rc) { m_pendingSubscriptions.erase( topic ); @@ -737,7 +737,7 @@ bool ClientPaho::isOverlappingInternal( const std::string& topic, std::string& e for( const auto& s : m_subscriptions ) { - if( testForOverlap(s.first, topic ) ) + if( testForOverlap( s.first, topic ) ) { existingTopic = s.first; return true; @@ -746,9 +746,9 @@ bool ClientPaho::isOverlappingInternal( const std::string& topic, std::string& e return false; } -void ClientPaho::pushIncomingEvent(std::function ev) +void ClientPaho::pushIncomingEvent( std::function ev ) { - m_callbackEventQueue.push(ev); + m_callbackEventQueue.push( ev ); } void ClientPaho::callbackEventHandler() @@ -767,19 +767,19 @@ void ClientPaho::callbackEventHandler() ev(); } } - // ("ClientPaho", "%1 - leaving callback event handler", m_clientId); + LogDebug( "[ClientPaho::callbackEventHandler]", std::string( m_clientId + " - leaving callback event handler" ) ); } void ClientPaho::onConnectOnInstance( const std::string& cause ) { (void) cause; { OSDEV_COMPONENTS_LOCKGUARD(m_mutex); - std::copy(m_subscriptions.begin(), m_subscriptions.end(), std::inserter(m_pendingSubscriptions, m_pendingSubscriptions.end())); + std::copy( m_subscriptions.begin(), m_subscriptions.end(), std::inserter( m_pendingSubscriptions, m_pendingSubscriptions.end() ) ); m_subscriptions.clear(); m_processPendingPublishes = true; // all publishes are on hold until publishPending is called. } - setConnectionStatus(ConnectionStatus::Connected); + setConnectionStatus( ConnectionStatus::Connected ); } void ClientPaho::onConnectSuccessOnInstance()