From 52b051e030c5ba48e6bfcfe799e36c4562745ba3 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Mon, 22 Aug 2022 11:42:30 -0400 Subject: Fix PrepareResultForMobileResponse (3 args) logic Should return true if one result is successful and the others are acceptable (in which case, 2 out of 3 checks return true) --- .../src/commands/request_from_mobile_impl.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/application_manager/src/commands/request_from_mobile_impl.cc b/src/components/application_manager/src/commands/request_from_mobile_impl.cc index 77cfd305fa..2e81ae5aea 100644 --- a/src/components/application_manager/src/commands/request_from_mobile_impl.cc +++ b/src/components/application_manager/src/commands/request_from_mobile_impl.cc @@ -660,9 +660,16 @@ bool RequestFromMobileImpl::PrepareResultForMobileResponse( ResponseInfo& out_second, ResponseInfo& out_third) const { SDL_LOG_AUTO_TRACE(); - bool result = (PrepareResultForMobileResponse(out_first, out_second) || - PrepareResultForMobileResponse(out_second, out_third)) || - PrepareResultForMobileResponse(out_first, out_third); + bool result_first_second = + PrepareResultForMobileResponse(out_first, out_second); + bool result_second_third = + PrepareResultForMobileResponse(out_second, out_third); + bool result_first_third = + PrepareResultForMobileResponse(out_first, out_third); + + bool result = (result_first_second && result_first_third) || + (result_second_third && result_first_second) || + (result_second_third && result_first_third); return result; } -- cgit v1.2.1