Commit ed30280f070a27065685fb21bfca704c4ee3c6fa

Authored by Steven
1 parent ca0cf29e

last changes.

Showing 1 changed file with 8 additions and 8 deletions
src/clientpaho.cpp
... ... @@ -669,7 +669,7 @@ std::int32_t ClientPaho::publishInternal( const MqttMessage& message, int qos )
669 669 // the insertion of the token into the pending operations.
670 670  
671 671 // OSDEV_COMPONENTS_LOCKGUARD(m_mutex);
672   - auto rc = MQTTAsync_sendMessage(m_client, message.topic().c_str(), &msg, &opts);
  672 + auto rc = MQTTAsync_sendMessage( m_client, message.topic().c_str(), &msg, &opts );
673 673 if( MQTTASYNC_SUCCESS != rc )
674 674 {
675 675 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 )
693 693 // Need to lock the mutex because it is possible that the callback is faster than
694 694 // the insertion of the token into the pending operations.
695 695 OSDEV_COMPONENTS_LOCKGUARD(m_mutex);
696   - auto rc = MQTTAsync_subscribe(m_client, topic.c_str(), qos, &opts);
  696 + auto rc = MQTTAsync_subscribe( m_client, topic.c_str(), qos, &opts );
697 697 if (MQTTASYNC_SUCCESS != rc)
698 698 {
699 699 m_pendingSubscriptions.erase( topic );
... ... @@ -737,7 +737,7 @@ bool ClientPaho::isOverlappingInternal( const std::string& topic, std::string& e
737 737  
738 738 for( const auto& s : m_subscriptions )
739 739 {
740   - if( testForOverlap(s.first, topic ) )
  740 + if( testForOverlap( s.first, topic ) )
741 741 {
742 742 existingTopic = s.first;
743 743 return true;
... ... @@ -746,9 +746,9 @@ bool ClientPaho::isOverlappingInternal( const std::string& topic, std::string& e
746 746 return false;
747 747 }
748 748  
749   -void ClientPaho::pushIncomingEvent(std::function<void()> ev)
  749 +void ClientPaho::pushIncomingEvent( std::function<void()> ev )
750 750 {
751   - m_callbackEventQueue.push(ev);
  751 + m_callbackEventQueue.push( ev );
752 752 }
753 753  
754 754 void ClientPaho::callbackEventHandler()
... ... @@ -767,19 +767,19 @@ void ClientPaho::callbackEventHandler()
767 767 ev();
768 768 }
769 769 }
770   - // ("ClientPaho", "%1 - leaving callback event handler", m_clientId);
  770 + LogDebug( "[ClientPaho::callbackEventHandler]", std::string( m_clientId + " - leaving callback event handler" ) );
771 771 }
772 772 void ClientPaho::onConnectOnInstance( const std::string& cause )
773 773 {
774 774 (void) cause;
775 775 {
776 776 OSDEV_COMPONENTS_LOCKGUARD(m_mutex);
777   - std::copy(m_subscriptions.begin(), m_subscriptions.end(), std::inserter(m_pendingSubscriptions, m_pendingSubscriptions.end()));
  777 + std::copy( m_subscriptions.begin(), m_subscriptions.end(), std::inserter( m_pendingSubscriptions, m_pendingSubscriptions.end() ) );
778 778 m_subscriptions.clear();
779 779 m_processPendingPublishes = true; // all publishes are on hold until publishPending is called.
780 780 }
781 781  
782   - setConnectionStatus(ConnectionStatus::Connected);
  782 + setConnectionStatus( ConnectionStatus::Connected );
783 783 }
784 784  
785 785 void ClientPaho::onConnectSuccessOnInstance()
... ...