compat: revert to using sqlite's close() function for compat with older distros.
close_v2(), in use before this commit, was introduced as part of sqlite 3.7.14 (2012-09-03), and is as such incompatible with debian wheezy (3.7.13) and centos6 (3.6.20). FTR, Wheezy will be supported until May 2018, and centos6, until November 2020.
This commit is contained in:
@@ -35,7 +35,7 @@ void Database::open(const std::string& filename)
|
|||||||
if (res != SQLITE_OK)
|
if (res != SQLITE_OK)
|
||||||
{
|
{
|
||||||
log_error("Failed to open database file ", filename, ": ", sqlite3_errmsg(new_db));
|
log_error("Failed to open database file ", filename, ": ", sqlite3_errmsg(new_db));
|
||||||
sqlite3_close_v2(new_db);
|
sqlite3_close(new_db);
|
||||||
throw std::runtime_error("");
|
throw std::runtime_error("");
|
||||||
}
|
}
|
||||||
Database::db = new_db;
|
Database::db = new_db;
|
||||||
@@ -238,7 +238,7 @@ std::vector<Database::RosterItem> Database::get_full_roster()
|
|||||||
|
|
||||||
void Database::close()
|
void Database::close()
|
||||||
{
|
{
|
||||||
sqlite3_close_v2(Database::db);
|
sqlite3_close(Database::db);
|
||||||
Database::db = nullptr;
|
Database::db = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user