diff options
author | Teodora Kireva <tkireva@luxoft.com> | 2017-02-07 19:02:32 +0200 |
---|---|---|
committer | Ira Lytvynenko <ILytvynenko@luxoft.com> | 2017-04-12 19:10:53 +0300 |
commit | 9311caa2e9979528817913764931ab410854b411 (patch) | |
tree | c29c8aaefecc690f5e670521119b04595a3a9e93 /src/components/include/policy | |
parent | 465a822befaee773db4975e35ddcb2032d51f272 (diff) | |
download | sdl_core-9311caa2e9979528817913764931ab410854b411.tar.gz |
Fix missing check for empty URLs
Missing check for empty URLs vector is added and
some code beautifying.
Diffstat (limited to 'src/components/include/policy')
-rw-r--r-- | src/components/include/policy/policy_external/policy/policy_manager.h | 3 | ||||
-rw-r--r-- | src/components/include/policy/policy_regular/policy/policy_types.h | 7 |
2 files changed, 8 insertions, 2 deletions
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<std::string, std::string> AppIdURL; +typedef std::pair<int, int> AppIdURL; } // namespace policy |