diff --git a/CMakeLists.txt b/CMakeLists.txt index 19e3f11..63f8c13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ INCLUDE(CheckPIESupported) CHECK_PIE_SUPPORTED() SET(CMAKE_POSITION_INDEPENDENT_CODE ON) -SET(MISSION_MODULE_VERSION 1.2.9) +SET(MISSION_MODULE_VERSION 1.2.10) OPTION(BRINGAUTO_INSTALL "Configure install" OFF) OPTION(BRINGAUTO_PACKAGE "Configure package creation" OFF) @@ -59,11 +59,10 @@ FIND_PACKAGE(fleet-protocol-interface 2.0.0 REQUIRED) FIND_PACKAGE(fleet-protocol-cxx-helpers-static 1.1.1 REQUIRED) IF (FLEET_PROTOCOL_BUILD_EXTERNAL_SERVER) - FIND_PACKAGE(fleet-http-client-shared 1.3.0 REQUIRED) + FIND_PACKAGE(fleet-http-client-shared 1.5.0 REQUIRED) ### fleet-http-client dependencies FIND_PACKAGE(Boost REQUIRED) FIND_PACKAGE(cpprestsdk REQUIRED) - FIND_PACKAGE(libbringauto_logger 1.2.0 REQUIRED) ENDIF () CMDEF_ADD_LIBRARY( diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index cc74dad..e594cd1 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -6,8 +6,7 @@ BA_PACKAGE_LIBRARY(protobuf v4.21.12) BA_PACKAGE_LIBRARY(zlib v1.2.11) IF (FLEET_PROTOCOL_BUILD_EXTERNAL_SERVER) - BA_PACKAGE_LIBRARY(fleet-http-client-shared v1.3.0) - BA_PACKAGE_LIBRARY(boost v1.78.0) - BA_PACKAGE_LIBRARY(cpprestsdk v2.10.20) - BA_PACKAGE_LIBRARY(ba-logger v1.2.0) + BA_PACKAGE_LIBRARY(fleet-http-client-shared v1.5.0) + BA_PACKAGE_LIBRARY(boost v1.86.0) + BA_PACKAGE_LIBRARY(cpprestsdk v2.10.20) ENDIF () diff --git a/source/external_server_api.cpp b/source/external_server_api.cpp index 2c3dec7..47f67a7 100644 --- a/source/external_server_api.cpp +++ b/source/external_server_api.cpp @@ -278,7 +278,8 @@ int wait_for_command(int timeout_time_in_ms, void *context) { auto con = static_cast (context); std::unique_lock lock(con->mutex); - std::vector> commands; + std::pair>, + bringauto::fleet_protocol::http_client::FleetApiClient::ReturnCode> commands; bool parse_commands = con->last_command_timestamp != 0; try { @@ -288,7 +289,7 @@ int wait_for_command(int timeout_time_in_ms, void *context) { } bool received_no_commands = true; - for(auto command : commands) { + for(const auto& command : commands.first) { if(command->getTimestamp() > con->last_command_timestamp) { con->last_command_timestamp = command->getTimestamp(); }