diff options
author | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-10-03 12:15:18 +0300 |
---|---|---|
committer | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-26 11:38:08 +0200 |
commit | d4ef1ca273b7daaa84e259d13c27e7110aed2328 (patch) | |
tree | 3e2dd3e89c2f7b9cd2248655fd375d774f0ee1b5 | |
parent | 7b4129a1239457b54952cdd86c4aa9c6c47658f2 (diff) | |
download | sdl_core-d4ef1ca273b7daaa84e259d13c27e7110aed2328.tar.gz |
Fixed requests param reading from incoming message
There was a problem that asBool() function of smart object
returns false for string/array/object types so this params
will no be included to params check list and will not be
cutted off after that. This check was replaced to ignore
only null/ivalid smart object types.
-rw-r--r-- | src/components/application_manager/src/commands/command_request_impl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc index 4c78231f94..7b7452dc77 100644 --- a/src/components/application_manager/src/commands/command_request_impl.cc +++ b/src/components/application_manager/src/commands/command_request_impl.cc @@ -624,7 +624,10 @@ bool CommandRequestImpl::CheckAllowedParameters() { smart_objects::SmartMap::const_iterator iter_end = s_map.map_end(); for (; iter != iter_end; ++iter) { - if (iter->second.asBool()) { + if (helpers::Compare<smart_objects::SmartType, helpers::NEQ, helpers::ALL>( + iter->second.getType(), + smart_objects::SmartType_Null, + smart_objects::SmartType_Invalid)) { LOG4CXX_DEBUG(logger_, "Request's param: " << iter->first); params.insert(iter->first); } |