diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-03-03 19:04:23 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-03-03 19:46:02 (GMT) |
commit | ffbd6feb875a9d50ec834fd6dfe967528697a9ff (patch) | |
tree | 7944ae736805663e0e97a2ad6ab3affc0abf24e8 /Swiften/History | |
parent | 72e0ddea7ca098cf824f4c47057f72157f62f046 (diff) | |
download | swift-ffbd6feb875a9d50ec834fd6dfe967528697a9ff.zip swift-ffbd6feb875a9d50ec834fd6dfe967528697a9ff.tar.bz2 |
Remove the async vfs for sqlite, to avoid the crash
Change-Id: I8cda6397048911f48575659ef2f59076d8022f03
Diffstat (limited to 'Swiften/History')
-rw-r--r-- | Swiften/History/SConscript | 1 | ||||
-rw-r--r-- | Swiften/History/SQLiteHistoryStorage.cpp | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/Swiften/History/SConscript b/Swiften/History/SConscript index 44b3cc4..ac3cf3b 100644 --- a/Swiften/History/SConscript +++ b/Swiften/History/SConscript @@ -3,7 +3,6 @@ Import("swiften_env") myenv = swiften_env.Clone() if myenv["target"] == "native": myenv.MergeFlags(swiften_env.get("SQLITE_FLAGS", {})) - myenv.MergeFlags(swiften_env.get("SQLITE_FLAGS_ASYNC", {})) if myenv["experimental"]: objects = myenv.SwiftenObject([ diff --git a/Swiften/History/SQLiteHistoryStorage.cpp b/Swiften/History/SQLiteHistoryStorage.cpp index d7e7477..2da389a 100644 --- a/Swiften/History/SQLiteHistoryStorage.cpp +++ b/Swiften/History/SQLiteHistoryStorage.cpp @@ -9,7 +9,6 @@ #include <boost/numeric/conversion/cast.hpp> #include <sqlite3.h> -#include <3rdParty/SQLiteAsync/sqlite3async.h> #include <Swiften/History/SQLiteHistoryStorage.h> #include <boost/date_time/gregorian/gregorian.hpp> @@ -27,11 +26,9 @@ inline std::string getEscapedString(const std::string& s) { namespace Swift { SQLiteHistoryStorage::SQLiteHistoryStorage(const std::string& file) : db_(0) { - sqlite3async_initialize(NULL, false); - thread_ = new boost::thread(boost::bind(&SQLiteHistoryStorage::run, this)); - sqlite3_open_v2(file.c_str(), &db_, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, "sqlite3async"); + sqlite3_open(file.c_str(), &db_); if (!db_) { std::cerr << "Error opening database " << file << std::endl; } @@ -51,7 +48,6 @@ SQLiteHistoryStorage::SQLiteHistoryStorage(const std::string& file) : db_(0) { } SQLiteHistoryStorage::~SQLiteHistoryStorage() { - sqlite3async_shutdown(); sqlite3_close(db_); delete thread_; } @@ -380,7 +376,6 @@ boost::posix_time::ptime SQLiteHistoryStorage::getLastTimeStampFromMUC(const JID } void SQLiteHistoryStorage::run() { - sqlite3async_run(); } } |