[Pkg-owncloud-commits] [owncloud-client] 22/69: ownSql: Don't set busy timeout on bad object

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Nov 7 19:41:07 UTC 2014


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 ff570c4a6bf413d4feb00aadc268078e3559521c
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Oct 28 21:46:30 2014 +0100

    ownSql: Don't set busy timeout on bad object
---
 src/mirall/ownsql.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mirall/ownsql.cpp b/src/mirall/ownsql.cpp
index da9d521..4c24361 100644
--- a/src/mirall/ownsql.cpp
+++ b/src/mirall/ownsql.cpp
@@ -50,11 +50,14 @@ bool SqlDatabase::open( const QString& filename )
     SQLITE_DO( sqlite3_open_v2(filename.toUtf8().constData(), &_db, flag, 0) );
 
     if( _errId != SQLITE_OK ) {
-        close(); // FIXME: Correct?
+        qDebug() << Q_FUNC_INFO << "Error:" << _error;
+        close();
         _db = 0;
     }
 
-    sqlite3_busy_timeout(_db, 5000);
+    if (_db) {
+        sqlite3_busy_timeout(_db, 5000);
+    }
 
     return isOpen();
 }

-- 
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