summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index 19bb658bca..efed06e313 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -637,9 +637,12 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
smart_objects::SmartObject(smart_objects::SmartType_Array);
smart_objects::SmartObject& list_so = (*device_list_so)[strings::device_list];
- int32_t index = 0;
+ uint32_t index = 0;
+ // According to requirements, SDL should send info about 100 devices at
+ // maximum, even if SDL has more devices connected.
+ const uint32_t max_device_count = 100;
for (connection_handler::DeviceMap::const_iterator it = devices.begin();
- devices.end() != it;
+ devices.end() != it && index < max_device_count;
++it) {
const connection_handler::Device& d =
static_cast<connection_handler::Device>(it->second);