Fix RPC's success code in case of UNSUPPORTED_RESOURCE#1575
Fix RPC's success code in case of UNSUPPORTED_RESOURCE#1575AKalinich-Luxoft wants to merge 3 commits intosmartdevicelink:developfrom
Conversation
|
@AByzhynar, @LitvinenkoIra, @LuxoftAKutsan, @dev-gh, @anosach-luxoft please review |
| */ | ||
| bool PrepareResultForMobileResponse(ResponseInfo& out_first, | ||
| ResponseInfo& out_second) const; | ||
| virtual bool PrepareResultForMobileResponse(ResponseInfo& out_first, |
There was a problem hiding this comment.
@AKalinich-Luxoft Please rename parameters like you did in IsResultCodeUnsupported(const ResponseInfo& first_iface_response...
There was a problem hiding this comment.
@AKalinich-Luxoft No requested changes provided
There was a problem hiding this comment.
@AByzhynar sorry, wrong commit number. Please see 9e2ce85
| * @return resulting code for sending to mobile application. | ||
| */ | ||
| mobile_apis::Result::eType PrepareResultCodeForResponse( | ||
| virtual mobile_apis::Result::eType PrepareResultCodeForResponse( |
There was a problem hiding this comment.
@AKalinich-Luxoft Please rename parameters like you did in IsResultCodeUnsupported(const ResponseInfo& first_iface_response...
There was a problem hiding this comment.
@AKalinich-Luxoft No requested changes provided
There was a problem hiding this comment.
@AByzhynar sorry, wrong commit number. Please see 9e2ce85
7930ff8 to
596d8b9
Compare
| bool PrepareResultForMobileResponse(ResponseInfo& out_first, | ||
| ResponseInfo& out_second) const; | ||
| virtual bool PrepareResultForMobileResponse( | ||
| ResponseInfo& first_iface_response, |
There was a problem hiding this comment.
@AKalinich-Luxoft it is it out parameters please mark them as out parameters
| (first.is_unsupported_resource && second.is_unsupported_resource); | ||
| bool IsResultCodeUnsupported(const ResponseInfo& first_iface_response, | ||
| const ResponseInfo& second_iface_response) { | ||
| return ((first_iface_response.is_ok || |
There was a problem hiding this comment.
@AKalinich-Luxoft please split this condition to bool const variables for understanding.
| out_second.is_invalid_enum = | ||
| hmi_apis::Common_Result::INVALID_ENUM == out_second.result_code; | ||
| second_iface_response.is_invalid_enum = | ||
| hmi_apis::Common_Result::INVALID_ENUM == |
There was a problem hiding this comment.
@LuxoftAKutsan yes, this code was formatted with clang-format-3.6
Fixed AlertManeuver success result in case of UNSUPPORTED_RESOURCE. The problem was that SDL does not check success result in this specific case. In this commit: - Added check for UNSUPPORTED_RESOURCE case - All specific checks were moved to PrepareResultForMobileResponse/PrepareResultCodeForResponse function - PrepareResultForMobileResponse is currently virtual
Fixed Alert, AlertManeuver, PerformAudioPassThru success code in case of UNSUPPORTED_RESOURCE. The root cause of problem here is that SDL does not check specific case for this result code for RPC with two or more interfaces and just return wrong success result code. In this commit: - Added overriden functions PrepareResultForMobileResponse/PrepareResultCodeForResponse to cover specific cases for listed RPCs
Updated unit test expectations for PerformAudioPassThruRequestTest
596d8b9 to
abdf536
Compare
|
@LuxoftAKutsan please finish you review |
|
Can one of the admins verify this patch? |
2 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
Fixed Alert, AlertManeuver, PerformAudioPassThru success code in case of
UNSUPPORTED_RESOURCE. The root cause of problem here is that SDL does not check specific case for this result code for RPC with two or more interfaces and just return wrong success result code.In this pull request:
PrepareResultForMobileResponse/PrepareResultCodeForResponseto cover specific cases for listed RPCs
PerformAudioPassThruRequestTestNote
Some changes are from PR #1567 and will disappear after rebase.