[Pkg-owncloud-commits] [owncloud-client] 72/175: SyncJournalDb::updateErrorBlacklistEntry: lock the mutext at the beginning

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit d148464efedb1d0e939a1291072c76d3ab155e3b
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed May 20 15:30:19 2015 +0200

    SyncJournalDb::updateErrorBlacklistEntry:  lock the mutext at the beginning
    
    The mutex need to be locked before checkConnect, that's what all the other functions are doing
---
 src/libsync/syncjournaldb.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp
index ce2bf03..9298a12 100644
--- a/src/libsync/syncjournaldb.cpp
+++ b/src/libsync/syncjournaldb.cpp
@@ -1164,12 +1164,11 @@ void SyncJournalDb::wipeErrorBlacklistEntry( const QString& file )
 
 void SyncJournalDb::updateErrorBlacklistEntry( const SyncJournalErrorBlacklistRecord& item )
 {
+    QMutexLocker locker(&_mutex);
     if( !checkConnect() ) {
         return;
     }
 
-    QMutexLocker locker(&_mutex);
-
     _setErrorBlacklistQuery->bindValue(1, item._file);
     _setErrorBlacklistQuery->bindValue(2, item._lastTryEtag);
     _setErrorBlacklistQuery->bindValue(3, QString::number(item._lastTryModtime));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list