mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove some dead code and make sure we get full mutexes.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user