summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2017-10-03 12:15:18 +0300
committerValerii <vmalkov@luxoft.com>2018-01-26 15:17:35 +0200
commit76c50bb7176631e7340375c4a64339980266dea5 (patch)
treeeb2baa8ce9e0a51fdf274beddb6a33ffb4fd673d
parent76323825d951027394fa27cfa7461e840a546f4b (diff)
downloadsdl_core-76c50bb7176631e7340375c4a64339980266dea5.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.cc5
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 d283c648a9..92098935fe 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -611,7 +611,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);
}