From d52eebaa66d5b5c790dcb6cc8cd0dbac0c2d3d2b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 11 Mar 2014 23:28:57 -0400 Subject: [PATCH] Bug TW-1288 - TW-1288 Added missing locking for task modifications (thanks to Kosta H, Ralph Bean, Adam Coddington). --- ChangeLog | 2 ++ src/TDB2.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 87cf746e8..cf0272023 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,8 @@ Bugs to Michele Vetturi). - TD-45 Fix preprocessor define (thanks to Jochen Sprickerhof). - TW-1282 incorrect URLs in man task-sync (thanks to Jeremiah Marks). +- TW-1288 Added missing locking for task modifications (thanks to Kosta H, + Ralph Bean, Adam Coddington). - #1511 sync init crashes if client certification file is empty or invalid (thanks to Marton Suranyi). - #1508 Show command highlight configuration (thanks to Nicolas Appriou). diff --git a/src/TDB2.cpp b/src/TDB2.cpp index a74ab1e4a..475e86568 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -233,6 +233,9 @@ void TF2::commit () { if (_file.open ()) { + if (context.config.getBoolean ("locking")) + _file.waitForLock (); + // Truncate the file and rewrite. _file.truncate ();