diff options
author | JackLivio <jack@livio.io> | 2018-04-04 15:18:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 15:18:26 -0400 |
commit | 0e3b9740072e3353d1a0aaeb2944e69659cdda6d (patch) | |
tree | b5a263374b9e9248eea73c6c25de7f7946b241f4 | |
parent | 5cc7b1be23764cb9763154ecb6d56e038f9eccb5 (diff) | |
parent | 230ad92b9a83797c80bbc29a03b3fe66f7a9a13b (diff) | |
download | sdl_core-0e3b9740072e3353d1a0aaeb2944e69659cdda6d.tar.gz |
Merge pull request #2108 from smartdevicelink/fix/load_service_type_as_string_from_backup_pt
Additional fixes for 2072
-rw-r--r-- | src/components/policy/policy_external/src/sql_pt_representation.cc | 8 | ||||
-rw-r--r-- | src/components/utils/test/policy.sql | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index 6cc68cb102..4315d99b3a 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -559,10 +559,10 @@ void SQLPTRepresentation::GatherModuleConfig( LOG4CXX_WARN(logger_, "Incorrect select statement for endpoints"); } else { while (endpoints.Next()) { - std::stringstream stream; - stream << "0x0" << endpoints.GetInteger(1); - config->endpoints[stream.str()][endpoints.GetString(2)].push_back( - endpoints.GetString(0)); + const std::string& url = endpoints.GetString(0); + const std::string& service = endpoints.GetString(1); + const std::string& app_id = endpoints.GetString(2); + config->endpoints[service][app_id].push_back(url); } } diff --git a/src/components/utils/test/policy.sql b/src/components/utils/test/policy.sql index 292855734e..d588d695a6 100644 --- a/src/components/utils/test/policy.sql +++ b/src/components/utils/test/policy.sql @@ -263,7 +263,7 @@ BEGIN TRANSACTION; CREATE INDEX IF NOT EXISTS `consent_group.fk_consent_group_functional_group1_idx` ON `consent_group`(`functional_group_id`); CREATE TABLE IF NOT EXISTS `endpoint`( - `service` INTEGER NOT NULL, + `service` VARCHAR(100) NOT NULL, `url` VARCHAR(100) NOT NULL, `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, CONSTRAINT `fk_endpoint_application1` |