diff options
author | JackLivio <jack@livio.io> | 2018-02-13 13:15:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 13:15:11 -0500 |
commit | c50c54e0279a48923e607de931566413b56fafef (patch) | |
tree | 05b984d9916aec813bf59db5d4d9b2d9c0a81e01 | |
parent | 21112d37d0462573cc311c4ecb73ec272ac2fc73 (diff) | |
parent | ac8d45fa4218228dadb5a402a8cd88edf7617f52 (diff) | |
download | sdl_core-c50c54e0279a48923e607de931566413b56fafef.tar.gz |
Merge pull request #1954 from fronneburg/fix/Issue_1953
protect access to ResumptionDataJson during state save
-rw-r--r-- | src/components/application_manager/src/resumption/resumption_data_json.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc index e99d8bae26..b8ce6a76c4 100644 --- a/src/components/application_manager/src/resumption/resumption_data_json.cc +++ b/src/components/application_manager/src/resumption/resumption_data_json.cc @@ -484,6 +484,9 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id, } void ResumptionDataJson::Persist() { + // We lock the resumption data because SaveStateToFileSystem accesses + // the same dictionary that we use here in ResumptionDataJson + sync_primitives::AutoLock autolock(resumption_lock_); last_state().SaveStateToFileSystem(); } |