From 9311caa2e9979528817913764931ab410854b411 Mon Sep 17 00:00:00 2001 From: Teodora Kireva Date: Tue, 7 Feb 2017 19:02:32 +0200 Subject: Fix missing check for empty URLs Missing check for empty URLs vector is added and some code beautifying. --- .../include/policy/policy_external/policy/policy_manager.h | 3 ++- src/components/include/policy/policy_regular/policy/policy_types.h | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/components/include/policy') diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h index 5fd25d2461..6928133775 100644 --- a/src/components/include/policy/policy_external/policy/policy_manager.h +++ b/src/components/include/policy/policy_external/policy/policy_manager.h @@ -484,7 +484,8 @@ class PolicyManager : public usage_statistics::StatisticsManager { /** * @brief Finds the next URL that must be sent on OnSystemRequest retry * @param urls vector of vectors that contain urls for each application - * @return Pair of policy application id and application url id + * @return Pair of policy application id and application url id from the + * urls vector */ virtual AppIdURL GetNextUpdateUrl(const EndpointUrls& urls) = 0; protected: diff --git a/src/components/include/policy/policy_regular/policy/policy_types.h b/src/components/include/policy/policy_regular/policy/policy_types.h index b13e6bab87..3405cf30d6 100644 --- a/src/components/include/policy/policy_regular/policy/policy_types.h +++ b/src/components/include/policy/policy_regular/policy/policy_types.h @@ -313,6 +313,11 @@ struct MetaInfo { std::string language; }; +/** + * @brief The index of the application and the index of its URL + * from the Endpoints vector that will be sent on the next + * OnSystemRequest retry sequence + */ struct RetrySequenceURL { int app_idx_; int url_idx_; @@ -323,7 +328,7 @@ struct RetrySequenceURL { } }; -typedef std::pair AppIdURL; +typedef std::pair AppIdURL; } // namespace policy -- cgit v1.2.1