issue warning if sqlite finalize is missing
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 26 Oct 2012 11:22:02 +0000 (13:22 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 26 Oct 2012 11:22:02 +0000 (13:22 +0200)
src/libstrongswan/plugins/sqlite/sqlite_database.c

index e2352b2..1fb3065 100644 (file)
@@ -300,7 +300,10 @@ static int busy_handler(private_sqlite_database_t *this, int count)
 METHOD(database_t, destroy, void,
        private_sqlite_database_t *this)
 {
-       sqlite3_close(this->db);
+       if (sqlite3_close(this->db) == SQLITE_BUSY)
+       {
+               DBG1(DBG_LIB, "sqlite close failed because database is busy");
+       }
        this->mutex->destroy(this->mutex);
        free(this);
 }