diff --git a/CMakeLists.txt b/CMakeLists.txt index d4421503..9fbf0619 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13) project(OpenOCPP DESCRIPTION "Open Source C++ implementation of the OCPP 1.6 protocol" - VERSION 1.3.0 + VERSION 1.3.1 ) # Definitions for Version.h file diff --git a/examples/common/config/OcppConfig.cpp b/examples/common/config/OcppConfig.cpp index 3c53f5a9..6c4db9be 100644 --- a/examples/common/config/OcppConfig.cpp +++ b/examples/common/config/OcppConfig.cpp @@ -200,8 +200,8 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string& std::size_t key_is_interval = key.find("Interval"); if (key_is_interval != std::string::npos) { - std::size_t value_is_negative = key.find("-"); - if (value_is_negative) + std::size_t value_is_negative = value.find("-"); + if (value_is_negative != std::string::npos) { ret = ConfigurationStatus::Rejected; } diff --git a/src/chargepoint/smartcharging/SmartChargingManager.cpp b/src/chargepoint/smartcharging/SmartChargingManager.cpp index 4f67999d..0ca28601 100644 --- a/src/chargepoint/smartcharging/SmartChargingManager.cpp +++ b/src/chargepoint/smartcharging/SmartChargingManager.cpp @@ -303,6 +303,7 @@ bool SmartChargingManager::handleMessage(const ocpp::messages::SetChargingProfil } else { + ret = false; error_message = "Recurring profiles must have a start schedule and a duration"; } } diff --git a/src/rpc/RpcBase.cpp b/src/rpc/RpcBase.cpp index 65afaa16..dcfd978a 100644 --- a/src/rpc/RpcBase.cpp +++ b/src/rpc/RpcBase.cpp @@ -231,6 +231,7 @@ void RpcBase::start() { // Start reception thread m_requests_queue.setEnable(true); + m_results_queue.setEnable(true); m_rx_thread = new std::thread(std::bind(&RpcBase::rxThread, this)); } } diff --git a/src/websockets/WebsocketFactory.cpp b/src/websockets/WebsocketFactory.cpp index 6858f654..ef3044c8 100644 --- a/src/websockets/WebsocketFactory.cpp +++ b/src/websockets/WebsocketFactory.cpp @@ -98,7 +98,7 @@ bool WebsocketFactory::setClientPoolCount(size_t count) /** @brief Start the client pools */ bool WebsocketFactory::startClientPools() { - bool ret = false; + bool ret = true; std::lock_guard lock(s_client_pools_mutex); if (!s_client_pools.empty()) @@ -115,7 +115,7 @@ bool WebsocketFactory::startClientPools() /** @brief Stop the client pools */ bool WebsocketFactory::stopClientPools() { - bool ret = false; + bool ret = true; std::lock_guard lock(s_client_pools_mutex); if (!s_client_pools.empty())