diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-31 20:36:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-31 20:36:20 +0300 |
commit | c6b493f65d7d768782852b6379c663161b63695f (patch) | |
tree | a1801a5fb24bc824141706a13668e823cf502e26 /plugins/Dbx_sqlite/src/dbcontacts.cpp | |
parent | f09905686074cac363f5e66b5fc6deafc661e912 (diff) |
Dbx_sqlite:
- advanced error handling;
- a profile is always opened in exclusive mode;
- fixes #2717 (wrong query in line 115);
- fixes #2694 (two Mirandas can open the same profile, but the second one fails);
- version bump
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbcontacts.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index f9c32981cf..740330921e 100755 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -32,7 +32,7 @@ void CDbxSQLite::InitContacts() DBCachedContact *cc = (hContact) ? m_cache->AddContactToCache(hContact) : &m_system; cc->m_count = sqlite3_column_int64(stmt, 1); } - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_finalize(stmt); } @@ -47,7 +47,7 @@ LONG CDbxSQLite::GetContactCount() mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = ctc_stmts[SQL_CTC_STMT_COUNT].pQuery; int rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); int count = sqlite3_column_int(stmt, 0); sqlite3_reset(stmt); return count; @@ -60,7 +60,7 @@ MCONTACT CDbxSQLite::AddContact() mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = ctc_stmts[SQL_CTC_STMT_ADD].pQuery; int rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); if (rc != SQLITE_DONE) return INVALID_CONTACT_ID; @@ -87,7 +87,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) sqlite3_stmt *stmt = ctc_stmts[SQL_CTC_STMT_DELETEEVENTS].pQuery; sqlite3_bind_int64(stmt, 1, hContact); int rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); if (rc != SQLITE_DONE) return 1; @@ -95,7 +95,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) stmt = ctc_stmts[SQL_CTC_STMT_DELETEEVENTS_SRT].pQuery; sqlite3_bind_int64(stmt, 1, hContact); rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); if (rc != SQLITE_DONE) return 1; @@ -103,7 +103,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) stmt = ctc_stmts[SQL_CTC_STMT_DELETESETTINGS].pQuery; sqlite3_bind_int64(stmt, 1, hContact); rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); if (rc != SQLITE_DONE) return 1; @@ -111,7 +111,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) stmt = ctc_stmts[SQL_CTC_STMT_DELETE].pQuery; sqlite3_bind_int64(stmt, 1, hContact); rc = sqlite3_step(stmt); - logError(rc); + logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); if (rc != SQLITE_DONE) return 1; |