From f596c36f4a359d5c1ca6179f00f400d25e8585e4 Mon Sep 17 00:00:00 2001 From: Eran Date: Mon, 12 Apr 2021 13:31:43 +0300 Subject: [PATCH] PR #8807 from Nir: Recommended update pop up hot fix (cherry picked from commit fbb09f717939c5927489f090ff243841abad268d) --- common/sw-update/dev-updates-profile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/sw-update/dev-updates-profile.cpp b/common/sw-update/dev-updates-profile.cpp index bd9f328a43..905a961724 100644 --- a/common/sw-update/dev-updates-profile.cpp +++ b/common/sw-update/dev-updates-profile.cpp @@ -110,8 +110,8 @@ namespace rs2 auto found = std::find_if( software_versions.begin(), software_versions.end(), - [policy]( const std::pair< sw_update::version, version_info > & ver_info ) { - return ver_info.second.policy == policy; + [&]( const std::pair< sw_update::version, version_info > & ver_info ) { + return ver_info.second.policy == policy && software_version < ver_info.first; } ); if( found != software_versions.end() ) { @@ -127,8 +127,8 @@ namespace rs2 auto found = std::find_if( firmware_versions.begin(), firmware_versions.end(), - [policy](const std::pair< sw_update::version, version_info >& ver_info) { - return ver_info.second.policy == policy; + [&](const std::pair< sw_update::version, version_info >& ver_info) { + return ver_info.second.policy == policy && firmware_version < ver_info.first; } ); if( found != firmware_versions.end() ) {