diff options
Diffstat (limited to 'src/libstrongswan/plugins/sqlite/sqlite_database.c')
-rw-r--r-- | src/libstrongswan/plugins/sqlite/sqlite_database.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/sqlite/sqlite_database.c b/src/libstrongswan/plugins/sqlite/sqlite_database.c index 0fb3c7fff..1fb306579 100644 --- a/src/libstrongswan/plugins/sqlite/sqlite_database.c +++ b/src/libstrongswan/plugins/sqlite/sqlite_database.c @@ -18,7 +18,7 @@ #include <sqlite3.h> #include <unistd.h> #include <library.h> -#include <debug.h> +#include <utils/debug.h> #include <threading/mutex.h> typedef struct private_sqlite_database_t private_sqlite_database_t; @@ -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); } |