Perform explicit sqlite3 init/deinit

This commit is contained in:
Julien BLACHE
2010-04-26 18:24:09 +02:00
parent 4551d530f9
commit 0411720a58
3 changed files with 18 additions and 0 deletions

View File

@@ -3931,6 +3931,13 @@ db_init(void)
db_path = cfg_getstr(cfg_getsec(cfg, "general"), "db_path");
ret = sqlite3_initialize();
if (ret != SQLITE_OK)
{
DPRINTF(E_FATAL, L_DB, "SQLite3 failed to initialize\n");
return -1;
}
if (!sqlite3_threadsafe())
{
DPRINTF(E_FATAL, L_DB, "The SQLite3 library is not built with a threadsafe configuration\n");
@@ -3964,3 +3971,9 @@ db_init(void)
return 0;
}
void
db_deinit(void)
{
sqlite3_shutdown();
}