summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2018-04-18 13:15:01 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2018-04-18 13:15:01 -0400
commitd7fab1574f0884424779b4d31c70e8af66b3ee23 (patch)
treed4877cfdde7c08de21bbb7693d4f59ed0f41c0f4
parent61ab847b12ecfef12062829832635f1893df0f16 (diff)
parent7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff)
downloadsdl_core-d7fab1574f0884424779b4d31c70e8af66b3ee23.tar.gz
Merge branch 'master' into develop
-rw-r--r--CHANGELOG.md153
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/examples/cpp/console.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetdecoder.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetencoder.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/logger.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/serversocket.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/sockethubappender.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/threadcxx.cpp2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/logger.h2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/location/locationinfo.h2
-rw-r--r--src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/loggingevent.h2
-rw-r--r--src/appMain/sdl_preloaded_pt.json4
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc3
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc1
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h30
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h30
-rw-r--r--src/components/hmi_message_handler/src/mb_controller.cc29
-rw-r--r--src/components/hmi_message_handler/src/websocket_session.cc30
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc13
-rw-r--r--src/components/policy/policy_external/src/sql_pt_representation.cc8
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc10
-rw-r--r--src/components/utils/test/policy.sql2
26 files changed, 233 insertions, 108 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b97dd0471..481f63a805 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,92 +1,61 @@
-# 4.3.0 Release Candidate
-
-## New Features
-
-### EXTENDED_POLICY modes:
-- The `EXTENDED_POLICY` CMake variable (previously `ENABLE_EXTENDED_POLICY`) now has three possible configurations
- - `HTTP` (previously `ENABLE_EXTENDED_POLICY: OFF`) - #941
- - `PROPRIETARY` (previously `ENABLE_EXTENDED_POLICY: ON`) - #940
- - `EXTERNAL_PROPRIETARY` (new, fully featured version of `PROPRIETARY` mode) - #942
-
-### EXTERNAL_PROPRIETARY mode:
-#### New policy table update sequence
-A new policy table update flow was created specifically for the `EXTERNAL_PROPRIETARY` policy mode
-
-- Requirements/Details - #933
-- Diagram - https://user-images.githubusercontent.com/10549248/26896053-9417c604-4b91-11e7-9e47-524c930eb542.png
-
-#### External Policy Manager
-As part of the `EXTERNAL_PROPRIETARY` policy mode, the concept of an "external policy manager" is necessary. This policy manager is a separate program which is in charge of encrypting/decrypting policy tables and attaching an HTTP header to the OnSystemRequest payload when performing a Policy Table Update.
-
-As part of this release, a sample application which performs this function was added to this repository for those who wish to implement this new policy mode, and this program can be started along with Core using an included bash script. This sample application does nothing with the policy table snapshot during the encryption and decryption phases, allowing for OEMs to implement their own encryption algorithms in their place.
-
-#### App permissions/User consent
-Users can now control what functional groups that they want apps to be able to access, as well as decide whether to enable SDL functionality at all on a device-by-device basis.
-
- - Logic was added to allow the user to control what devices are permitted to use SDL functionality - #934
- - Users are prompted when activating an app on a new device for the first time whether or not to allow the device to use SDL functionality (sequence shown in [this diagram](https://user-images.githubusercontent.com/10549248/26897493-ba378f2c-4b96-11e7-93b0-b24f01c7dc28.png))
- - Logic was added to the Policy Manager to allow the user to control what apps have access to specific functional groups - #939
- - Users are prompted when activating an app for the first time (or modifying permissions in settings) with information on what access a requested functional group requires. The user responds to determine whether or not to allow this functionality within the new app (sequence shown in [this diagram](https://user-images.githubusercontent.com/10549248/26902322-e6e02bf0-4ba6-11e7-98b3-c285396061a4.png))
-
-
-#### External user consent
-External user consent allows the HMI to define several groups of permissions within the policy table. This allows the user to enable/disable several functional groups at once.
-
- - The `externalConsentStatus` field is included as part of a GetListOfPermissions response from SDL Core to communicate which groups are activated - #1047
- - External consent groups can be used to enable sets of functional groups using the `disallowed_by_external_consent_entities_off` field in the Policy Table - #1049
- - If this external consent group is set to `ON`, all functional groupings with this parameter are allowed by the user - #1048
- - If this external consent group is set to `OFF`, all functional groupings with this parameter are disallowed by the user - #1050
- - External consent groups can be used to disable sets of functional groups using the `disallowed_by_external_consent_entities_on` field in the Policy Table
- - If this external consent group is set to `ON`, all functional groupings with this parameter are disallowed by the user
- - If this external consent group is set to `OFF`, all functional groupings with this parameter are allowed by the user
-
-#### Cache Manager Function Implementations
-Prior to this release, several functions included in cache_manager.cc were not fully implemented and would not query the local policy table for defined rules and policies. The newly implemented functions for the `EXTERNAL_PROPRIETARY` cache manager are listed below:
- - [CanAppKeepContext()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L310)
- - [CanAppStealFocus()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L363)
- - [GetDefaultHMI()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L374)
- - [ResetUserConsent()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L391)
- - [GetUserPermissionsForDevice()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L406)
- - [GetPreconsentedGroups()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L477)
- - [GetConsentedGroups()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L514)
- - [GetUnconsentedGroups()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L549)
- - [RemoveAppConsentForGroup()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L605)
- - [GetDeviceGroupsFromPolicies()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L799)
- - [SetDeviceData()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L975)
- - [SetUserPermissionsForDevice()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1008)
- - [ReactOnUserDevConsentForApp()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1043)
- - [SetUserPermissionsForApp()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1076)
- - [CountUnconsentedGroups()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1768)
- - [SetMetaInfo()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1868)
- - [IsMetaInfoPresent()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1884)
- - [SetSystemLanguage()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1893)
- - [CleanupUnpairedDevices()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L1919)
- - [SetVinValue()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L2175)
- - [ResetPT()](https://github.com/smartdevicelink/sdl_core/blob/release/4.3.0/src/components/policy/policy_external/src/cache_manager.cc#L2309)
-
-#### Security behavior
-Requirements/Details - #937
-
-### HMI_API additions:
-
-A new RPC was added as part of the implementation of `EXTERNAL_PROPRIETARY` policy mode
-
- - [DecryptCertificate](https://github.com/smartdevicelink/sdl_core/blob/6283aa26e262d2d16ed1393989d8e0e062dba88d/src/components/interfaces/HMI_API.xml#L2468-L2476) RPC
-
-Several API additions were made as part of the implementation of the external user consent feature
-
- - [EntityStatus](https://github.com/smartdevicelink/sdl_core/blob/6283aa26e262d2d16ed1393989d8e0e062dba88d/src/components/interfaces/HMI_API.xml#L1263-L1266) enum
- - [ExternalConsentStatus](https://github.com/smartdevicelink/sdl_core/blob/6283aa26e262d2d16ed1393989d8e0e062dba88d/src/components/interfaces/HMI_API.xml#L1268-L1278) struct
- - externalConsentStatus field added to [OnAppPermissionConsent](https://github.com/smartdevicelink/sdl_core/blob/6283aa26e262d2d16ed1393989d8e0e062dba88d/src/components/interfaces/HMI_API.xml#L4170-L4172) and [GetListOfPermissions](https://github.com/smartdevicelink/sdl_core/blob/6283aa26e262d2d16ed1393989d8e0e062dba88d/src/components/interfaces/HMI_API.xml#L4170-L4172)
-
-## Fixes
-- Includes fixes for all defects found by the Coverity scan tool that were introduced in this release - #1641
-- Includes fixes for several Coverity defects that were previously implemented in the `coverity` branch - #1637
-
-## Implemented proposals
-Two new evolution proposals were implemented in release 4.3.0:
-
-- Add API Patch Version [SDL-0050](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0050-add-api-patch-version.md)
- - A patch version was added to the MOBILE API version, HMI API interface versions, and SyncMsgVersion struct
-- External Policy Manager [SDL-0045](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0045-external-policy-manager.md)
- - Details for the implementation of this proposal can be found in the `External Policy Manager` section of these release notes
+# Release 4.5.0
+
+## Supported Specifications
+- SDL Mobile RPC Spec: [Version 4.5.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/4.5.0)
+- SDL Protocol Spec: [Version 5.0.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.0.0)
+
+## Implemented Proposals
+
+[Connectivity via iAP-BT and Transport Switch](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0053-Connectivity-via-iAP-BT-and-Transport-Switch.md) - Implementation of a mechanism to change a registered app connected over one transport to another seamlessly.
+
+[Mark public deprecated methods](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0092-Deprecated-interfaces-markup.md) - Implemented a DEPRECATED macro for marking deprecated methods in the project. Using methods marked with this macro will result in a warning being generated.
+
+[Remove QT HMI from SDL Core (Partially Complete)](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0110-remove-qt-hmi-from-sdl-core.md) - The `qt_hmi` component was removed from SDL Core, the QT_HMI_API interface and dbus adapter will be removed in the next major release, due to this aspect of the proposal requiring breaking changes.
+
+[Use Boost Library (Partially Complete)](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0044-use-Boost-library.md) - The `boost` library is now installed as a 3rd party library, this library is currently only used in the refactored message broker component.
+
+## Enhancements
+- `DBus` and `libusb` are now dynamically linked, instead of being installed as 3rd-party libraries during the SDL Core build - #2004
+
+## Bug Fixes
+- [Remove OEM Specific references in SDL policy table preload file](https://github.com/smartdevicelink/sdl_core/issues/1252)
+- ["resultCode" should be more descriptive than "INVALID_DATA"](https://github.com/smartdevicelink/sdl_core/issues/31)
+- [SDL doesn't apply sequence SUSPEND -> OnSDLAwake -> SUSPEND -> IGN_OFF for saving resumption data](https://github.com/smartdevicelink/sdl_core/issues/1395)
+- [SDL responds "resultCode: SUCCESS" while dataType:VEHICLEDATA_EXTERNTEMP is VEHICLE_DATA_NOT_AVAILABLE and not in subscribed list store](https://github.com/smartdevicelink/sdl_core/issues/982)
+- [Policies SDL should be case-insensetive to "AppID" against listed in policies manager](https://github.com/smartdevicelink/sdl_core/issues/992)
+- [App is disconnected due to PROTOCOL_VIOLATION when start audio streaming after rejected 2 times then accepted](https://github.com/smartdevicelink/sdl_core/issues/1004)
+- [SDL doesn't set unsuccessful "message" value to "info" param in case HMI responds via single UI.RPC when Interface.IsReady missing](https://github.com/smartdevicelink/sdl_core/issues/997)
+- [Navigation SDL does not respond info message in case GENERIC_ERROR watchdog timeout from HMI](https://github.com/smartdevicelink/sdl_core/issues/990)
+- [SDL does not respond info message in case GENERIC_ERROR watchdog timeout from HM](https://github.com/smartdevicelink/sdl_core/issues/1012)
+- [SDL doesn't send info parameter when result of ResetGlobalProperties is GENERIC_ERROR](https://github.com/smartdevicelink/sdl_core/issues/1016)
+- [SDL does not send StopAudioStream() if exit app while Video service and Audio service are starting.](https://github.com/smartdevicelink/sdl_core/issues/1002)
+- [APIs AlertManeuver: SDL responds GENERIC_ERROR instead of INVALID_DATA when soft button has Type is Image or Both and Text is whitespace or \t or \n or empty](https://github.com/smartdevicelink/sdl_core/issues/980)
+- [IVSU SDL doesn't reject SystemRequest with filenam=IVSU but w/o binary data.](https://github.com/smartdevicelink/sdl_core/issues/976)
+- [Memory leaks: SDL does not release memory after sending AddCommand limit exhausted](https://github.com/smartdevicelink/sdl_core/issues/1029)
+- [Negative result code send instead of IGNORED for UnsubscribedVehicleData when VehicleInfo IsReady Missing](https://github.com/smartdevicelink/sdl_core/issues/996)
+- [API SDL responds "UNSUPPORTED_RESOURCE", success= false in case only have "UNSUPPORTED_RESOURCE" to Navigation.AlertManeuver](https://github.com/smartdevicelink/sdl_core/issues/989)
+- [Default app policies are never updated after a PTU](https://github.com/smartdevicelink/sdl_core/issues/1772)
+- [Build fails with GCC6+](https://github.com/smartdevicelink/sdl_core/issues/1975)
+- [Remote Control test suite fails](https://github.com/smartdevicelink/sdl_core/issues/1993)
+- [PoliciesManager allows all requested params in case "parameters" field is empty](https://github.com/smartdevicelink/sdl_core/issues/1873)
+- [OnDriverDistraction SDL does not send notification to app right after this app changes level from NONE to any other](https://github.com/smartdevicelink/sdl_core/issues/1881)
+- [Protect access to Resumption data during LastState::SaveStateToFileSystem](https://github.com/smartdevicelink/sdl_core/issues/1953)
+- [Need to protect cache manager "pt_" from concurrent access](https://github.com/smartdevicelink/sdl_core/issues/1961)
+- [Prevent deadlock in EventDispatcherIimpl::raise_event](https://github.com/smartdevicelink/sdl_core/issues/1949)
+- [Bluetooth StartService fail after Core restarted](https://github.com/smartdevicelink/sdl_core/issues/1932)
+- [Silent error caused by implicit conversion of SmartPointer to integer](https://github.com/smartdevicelink/sdl_core/issues/1834)
+- [AOA USB transport buffer size too small](https://github.com/smartdevicelink/sdl_core/issues/1863)
+- [Lock screen icon URL should be updated](https://github.com/smartdevicelink/sdl_core/issues/1646)
+- [Broken link in README.md for Software Architecture Documentation](https://github.com/smartdevicelink/sdl_core/issues/2091)
+- [SDL doesn't send OnPermissionsChange in case of external user consent](https://github.com/smartdevicelink/sdl_core/issues/2072)
+- [Build fails when ENABLE_SECURITY=OFF](https://github.com/smartdevicelink/sdl_core/issues/2073)
+
+### Security Related Fixes
+- [SDL must start PTU for navi app right after app successfully registration](https://github.com/smartdevicelink/sdl_core/issues/1925)
+- [SDL must start PTU for any app except navi right after app successfully request to start first secure service](https://github.com/smartdevicelink/sdl_core/issues/1924)
+- [PolicyTableUpdate is failed by any reason and "ForceProtectedService"=ON at .ini file](https://github.com/smartdevicelink/sdl_core/issues/1923)
+- [PolicyTableUpdate has NO "certificate" and "ForceProtectedService"=ON at .ini file](https://github.com/smartdevicelink/sdl_core/issues/1922)
+- [SDL must respond NACK in case navigation app connected over protocol v2 sends StartService for audio service](https://github.com/smartdevicelink/sdl_core/issues/1912)
+- [PolicyTableUpdate has NO "certificate" and "ForceProtectedService"=OFF at .ini file](https://github.com/smartdevicelink/sdl_core/issues/1894)
+- [PolicyTableUpdate is failed by any reason and "ForceProtectedService"=OFF at .ini file](https://github.com/smartdevicelink/sdl_core/issues/1891)
+- [PolicyTableUpdate is valid and brings "certificate"](https://github.com/smartdevicelink/sdl_core/issues/1888)
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/examples/cpp/console.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
index 9fda7c8eb4..157982e845 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <stdlib.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetdecoder.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetdecoder.cpp
index ea5a680a6c..0336b8dafa 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetdecoder.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetdecoder.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/logstring.h>
#include <log4cxx/helpers/charsetdecoder.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetencoder.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetencoder.cpp
index 6b1f564666..adb8f8526d 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetencoder.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/charsetencoder.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/logstring.h>
#include <log4cxx/helpers/charsetencoder.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
index 2963b45619..40e3b67bd0 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <string.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp
index 46f5270f2a..654f9b0eb8 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/spi/location/locationinfo.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/logger.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/logger.cpp
index 203cb5c346..37b57180a2 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/logger.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/logger.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/logstring.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp
index 583f255b04..f9730792cf 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/spi/loggingevent.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/serversocket.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/serversocket.cpp
index f2b5de61c7..e5c1b29be9 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/serversocket.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/serversocket.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/helpers/serversocket.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/sockethubappender.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/sockethubappender.cpp
index 09f5d8ce31..5ef4b1b794 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/sockethubappender.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/sockethubappender.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#if defined(_MSC_VER)
#pragma warning ( disable: 4231 4251 4275 4786 )
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
index d5166dc8ec..a0e30aa6aa 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <string.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/threadcxx.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/threadcxx.cpp
index fffb43a66a..a40df3be94 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/threadcxx.cpp
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/threadcxx.cpp
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#include <log4cxx/logstring.h>
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/logger.h b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/logger.h
index 5d82b36b39..8f5fac2341 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/logger.h
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/logger.h
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#ifndef _LOG4CXX_LOGGER_H
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/location/locationinfo.h b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/location/locationinfo.h
index fc98121dce..f07216afe2 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/location/locationinfo.h
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/location/locationinfo.h
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#ifndef _LOG4CXX_SPI_LOCATION_LOCATIONINFO_H
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/loggingevent.h b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/loggingevent.h
index 2c9c353f8b..58deb3694a 100644
--- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/loggingevent.h
+++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/include/log4cxx/spi/loggingevent.h
@@ -13,6 +13,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * Note: This file has been modified from its original form.
*/
#ifndef _LOG4CXX_SPI_LOGGING_EVENT_H
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 0965d7710d..e5c82418ee 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -13,10 +13,10 @@
625],
"endpoints": {
"0x07": {
- "default": ["http://localhost:3000/api/1/policies/proprietary"]
+ "default": ["http://x.x.x.x:3000/api/1/policies/proprietary"]
},
"0x04": {
- "default": ["http://localhost:3000/api/1/softwareUpdate"]
+ "default": ["http://x.x.x.x:3000/api/1/softwareUpdate"]
},
"queryAppsUrl": {
"default": ["http://sdl.shaid.server"]
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index bbf391a9f1..559b9c0035 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -1091,8 +1091,7 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
MessageHelper::CreateGetVehicleDataRequest(
correlation_id, vehicle_data_args, application_manager_);
} else {
- LOG4CXX_WARN(logger_, "Exchange wasn't successful, trying another one.");
- policy_manager_->ForcePTExchange();
+ LOG4CXX_WARN(logger_, "Exchange wasn't successful");
}
OnPTUFinished(ret);
return ret;
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index 77500fd238..d9e1cefa01 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -408,7 +408,6 @@ TEST_F(PolicyHandlerTest, ReceiveMessageFromSDK_PTNotLoaded) {
// Checks
EXPECT_CALL(*mock_policy_manager_, LoadPT("", msg)).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_, ForcePTExchange()).WillOnce(Return(""));
EXPECT_CALL(app_manager_, GetNextHMICorrelationID()).Times(0);
EXPECT_CALL(mock_message_helper_, CreateGetVehicleDataRequest(_, _, _))
.Times(0);
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h b/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
index 98d5260259..60dc50ad7a 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
@@ -1,3 +1,33 @@
+/*
+Copyright (c) 2018 Livio, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of SmartDeviceLink Consortium, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#ifndef MB_CONTROLLER_H
#define MB_CONTROLLER_H
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
index c084bd7769..9692c4aef4 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
@@ -1,3 +1,33 @@
+/*
+Copyright (c) 2018 Livio, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of SmartDeviceLink Consortium, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#ifndef WEBSOCKET_SESSION_H
#define WEBSOCKET_SESSION_H
diff --git a/src/components/hmi_message_handler/src/mb_controller.cc b/src/components/hmi_message_handler/src/mb_controller.cc
index ec0d1f8bd8..8d3b11add5 100644
--- a/src/components/hmi_message_handler/src/mb_controller.cc
+++ b/src/components/hmi_message_handler/src/mb_controller.cc
@@ -1,3 +1,32 @@
+/*
+Copyright (c) 2018 Livio, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of SmartDeviceLink Consortium, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
#include "hmi_message_handler/mb_controller.h"
diff --git a/src/components/hmi_message_handler/src/websocket_session.cc b/src/components/hmi_message_handler/src/websocket_session.cc
index 19227a1555..26f15695c9 100644
--- a/src/components/hmi_message_handler/src/websocket_session.cc
+++ b/src/components/hmi_message_handler/src/websocket_session.cc
@@ -1,3 +1,33 @@
+/*
+Copyright (c) 2018 Livio, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of SmartDeviceLink Consortium, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#include "hmi_message_handler/websocket_session.h"
#include "hmi_message_handler/mb_controller.h"
#include <unistd.h>
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc
index 122efa2435..433a7a6bca 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -313,7 +313,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
utils::SharedPtr<policy_table::Table> policy_table_snapshot =
cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
- LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table");
+ LOG4CXX_ERROR(
+ logger_,
+ "Failed to create snapshot of policy table, trying another exchange");
+ ForcePTExchange();
return false;
}
@@ -327,7 +330,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
// Replace current data with updated
if (!cache_->ApplyUpdate(*pt_update)) {
- LOG4CXX_WARN(logger_, "Unsuccessful save of updated policy table.");
+ LOG4CXX_WARN(
+ logger_,
+ "Unsuccessful save of updated policy table, trying another exchange");
+ ForcePTExchange();
return false;
}
@@ -1568,8 +1574,7 @@ void PolicyManagerImpl::OnUpdateStarted() {
uint32_t update_timeout = TimeoutExchangeMSec();
LOG4CXX_DEBUG(logger_,
"Update timeout will be set to (milisec): " << update_timeout);
- send_on_update_sent_out_ =
- !wrong_ptu_update_received_ && !update_status_manager_.IsUpdatePending();
+ send_on_update_sent_out_ = !update_status_manager_.IsUpdatePending();
if (send_on_update_sent_out_) {
update_status_manager_.OnUpdateSentOut(update_timeout);
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/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc
index 39b303cbb5..3e08147a4c 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -196,7 +196,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
utils::SharedPtr<policy_table::Table> policy_table_snapshot =
cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
- LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table");
+ LOG4CXX_ERROR(
+ logger_,
+ "Failed to create snapshot of policy table, trying another exchange");
+ ForcePTExchange();
return false;
}
@@ -209,7 +212,10 @@ bool PolicyManagerImpl::LoadPT(const std::string& file,
// Replace current data with updated
if (!cache_->ApplyUpdate(*pt_update)) {
- LOG4CXX_WARN(logger_, "Unsuccessful save of updated policy table.");
+ LOG4CXX_WARN(
+ logger_,
+ "Unsuccessful save of updated policy table, trying another exchange");
+ ForcePTExchange();
return false;
}
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`