diff options
author | Frank <fronneburg@xevo.com> | 2017-12-13 11:59:09 -0800 |
---|---|---|
committer | Frank <fronneburg@xevo.com> | 2017-12-13 11:59:09 -0800 |
commit | ac8d45fa4218228dadb5a402a8cd88edf7617f52 (patch) | |
tree | 684bb74b14e185310a6e243217251a2312d55b30 /src | |
parent | 0b19cf498d1c9972d67b85793dc6b029c26378a0 (diff) | |
download | sdl_core-ac8d45fa4218228dadb5a402a8cd88edf7617f52.tar.gz |
protect access to ResumptionDataJson during state save
Diffstat (limited to 'src')
-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 7866fc4de1..2b7ac31b56 100644 --- a/src/components/application_manager/src/resumption/resumption_data_json.cc +++ b/src/components/application_manager/src/resumption/resumption_data_json.cc @@ -480,6 +480,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(); } |