summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2013-03-03 19:04:23 (GMT)
committerSwift Review <review@swift.im>2013-03-03 19:46:02 (GMT)
commitffbd6feb875a9d50ec834fd6dfe967528697a9ff (patch)
tree7944ae736805663e0e97a2ad6ab3affc0abf24e8 /Swiften
parent72e0ddea7ca098cf824f4c47057f72157f62f046 (diff)
downloadswift-ffbd6feb875a9d50ec834fd6dfe967528697a9ff.zip
swift-ffbd6feb875a9d50ec834fd6dfe967528697a9ff.tar.bz2
Remove the async vfs for sqlite, to avoid the crash
Change-Id: I8cda6397048911f48575659ef2f59076d8022f03
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/History/SConscript1
-rw-r--r--Swiften/History/SQLiteHistoryStorage.cpp7
-rw-r--r--Swiften/SConscript2
3 files changed, 2 insertions, 8 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();
}
}
diff --git a/Swiften/SConscript b/Swiften/SConscript
index b68dfec..8e6bd97 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -6,7 +6,7 @@ Import("env")
# Flags
################################################################################
-swiften_dep_modules = ["BOOST", "GCONF", "ICU", "LIBIDN", "ZLIB", "OPENSSL", "LIBXML", "EXPAT", "AVAHI", "LIBMINIUPNPC", "LIBNATPMP", "SQLITE", "SQLITE_ASYNC"]
+swiften_dep_modules = ["BOOST", "GCONF", "ICU", "LIBIDN", "ZLIB", "OPENSSL", "LIBXML", "EXPAT", "AVAHI", "LIBMINIUPNPC", "LIBNATPMP", "SQLITE"]
external_swiften_dep_modules = ["BOOST"]
if env["SCONS_STAGE"] == "flags" :