Remove some dead code and make sure we get full mutexes.

This commit is contained in:
JoelKatz
2013-09-27 14:40:36 -07:00
parent cd9a4e6b57
commit 9b28ad136b
3 changed files with 4 additions and 11 deletions

View File

@@ -18,12 +18,8 @@
//==============================================================================
int DatabaseCon::sCount = 0;
DatabaseCon::DatabaseCon (const std::string& strName, const char* initStrings[], int initCount)
{
++sCount;
// VFALCO TODO remove this dependency on the config by making it the caller's
// responsibility to pass in the path. Add a member function to Application
// or Config to compute this path.

View File

@@ -36,16 +36,11 @@ public:
{
return mLock;
}
static int getCount ()
{
return sCount;
}
// VFALCO TODO change "protected" to "private" throughout the code
private:
Database* mDatabase;
DeprecatedRecursiveMutex mLock;
static int sCount;
};
#endif

View File

@@ -65,7 +65,8 @@ SqliteDatabase::SqliteDatabase (const char* host)
void SqliteDatabase::connect ()
{
int rc = sqlite3_open (mHost.c_str (), &mConnection);
int rc = sqlite3_open_v2 (mHost.c_str (), &mConnection,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL);
if (rc)
{
@@ -81,7 +82,8 @@ sqlite3* SqliteDatabase::getAuxConnection ()
if (mAuxConnection == NULL)
{
int rc = sqlite3_open (mHost.c_str (), &mAuxConnection);
int rc = sqlite3_open_v2 (mHost.c_str (), &mAuxConnection,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL);
if (rc)
{