summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbevents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 7204aea647..4fa873adaf 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -65,7 +65,7 @@ void CDbxSQLite::InitEvents()
if (mir_strlen(module) > 0)
m_modules.insert(mir_strdup(module));
}
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_finalize(stmt);
}
@@ -90,7 +90,7 @@ LONG CDbxSQLite::GetEventCount(MCONTACT hContact)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_COUNT].pQuery;
sqlite3_bind_int64(stmt, 1, hContact);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
cc->m_count = (rc != SQLITE_ROW) ? 0 : sqlite3_column_int64(stmt, 0);
sqlite3_reset(stmt);
return cc->m_count;
@@ -149,7 +149,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
sqlite3_bind_blob(stmt, 6, dbei->pBlob, dbei->cbBlob, nullptr);
sqlite3_bind_text(stmt, 7, szEventId, (int)mir_strlen(szEventId), nullptr);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
MEVENT hDbEvent = sqlite3_last_insert_rowid(m_db);
@@ -159,7 +159,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
sqlite3_bind_int64(stmt, 2, cc->contactID);
sqlite3_bind_int64(stmt, 3, dbei->timestamp);
rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
cc->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead());
@@ -169,7 +169,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
sqlite3_bind_int64(stmt, 2, ccSub->contactID);
sqlite3_bind_int64(stmt, 3, dbei->timestamp);
rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt); //is this necessary ?
ccSub->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead());
@@ -202,7 +202,7 @@ BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_DELETE].pQuery;
sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
if (rc != SQLITE_DONE)
return 1;
@@ -210,7 +210,7 @@ BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent)
stmt = evt_stmts[SQL_EVT_STMT_DELETE_SRT].pQuery;
sqlite3_bind_int64(stmt, 1, hDbEvent);
rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
if (rc != SQLITE_DONE)
return 1;
@@ -247,7 +247,7 @@ BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO
sqlite3_bind_blob(stmt, 5, dbei->pBlob, dbei->cbBlob, nullptr);
sqlite3_bind_int64(stmt, 6, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
cc->EditEvent(hDbEvent, dbei->timestamp, !dbei->markedRead());
@@ -274,7 +274,7 @@ LONG CDbxSQLite::GetBlobSize(MEVENT hDbEvent)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_BLOBSIZE].pQuery;
sqlite3_bind_int(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return -1;
@@ -302,7 +302,7 @@ BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_GET].pQuery;
sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return 1;
@@ -343,7 +343,7 @@ BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_GETFLAGS].pQuery;
sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return -1;
@@ -362,7 +362,7 @@ BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent)
sqlite3_bind_int(stmt, 1, flags);
sqlite3_bind_int64(stmt, 2, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
if (rc != SQLITE_DONE)
return -1;
@@ -386,7 +386,7 @@ MCONTACT CDbxSQLite::GetEventContact(MEVENT hDbEvent)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_GETCONTACT].pQuery;
sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return INVALID_CONTACT_ID;
@@ -413,7 +413,7 @@ MEVENT CDbxSQLite::FindFirstEvent(MCONTACT hContact)
sqlite3_bind_int64(evt_cur_fwd, 1, hContact);
int rc = sqlite3_step(evt_cur_fwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
//empty response
//reset sql cursor
@@ -453,7 +453,7 @@ MEVENT CDbxSQLite::FindFirstUnreadEvent(MCONTACT hContact)
sqlite3_stmt *stmt;
sqlite3_prepare_v2(m_db, query, -1, &stmt, nullptr);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_finalize(stmt);
return 0;
@@ -468,7 +468,7 @@ MEVENT CDbxSQLite::FindFirstUnreadEvent(MCONTACT hContact)
sqlite3_bind_int64(stmt, 1, hContact);
sqlite3_bind_int(stmt, 2, DBEF_READ | DBEF_SENT);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return 0;
@@ -495,7 +495,7 @@ MEVENT CDbxSQLite::FindLastEvent(MCONTACT hContact)
evt_cur_backwd = evt_stmts[SQL_EVT_STMT_FINDLAST].pQuery;
sqlite3_bind_int64(evt_cur_backwd, 1, hContact);
int rc = sqlite3_step(evt_cur_backwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
//empty response
//reset sql cursor
@@ -531,7 +531,7 @@ MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent)
while (hDbEvent != sqlite3_column_int64(evt_cur_fwd, 0)) {
int rc = sqlite3_step(evt_cur_fwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc == SQLITE_DONE) {
//reset sql cursor
sqlite3_reset(evt_cur_fwd);
@@ -543,7 +543,7 @@ MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent)
}
int rc = sqlite3_step(evt_cur_fwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
//reset sql cursor
sqlite3_reset(evt_cur_fwd);
@@ -580,7 +580,7 @@ MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent)
while (hDbEvent != sqlite3_column_int64(evt_cur_backwd, 0)) {
int rc = sqlite3_step(evt_cur_backwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc == SQLITE_DONE) {
//reset sql cursor
sqlite3_reset(evt_cur_backwd);
@@ -592,7 +592,7 @@ MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent)
}
int rc = sqlite3_step(evt_cur_backwd);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
//reset sql cursor
sqlite3_reset(evt_cur_backwd);
@@ -616,7 +616,7 @@ MEVENT CDbxSQLite::GetEventById(LPCSTR szModule, LPCSTR szId)
sqlite3_bind_text(stmt, 1, szModule, (int)mir_strlen(szModule), nullptr);
sqlite3_bind_text(stmt, 2, szId, (int)mir_strlen(szId), nullptr);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
sqlite3_reset(stmt);
return 0;
@@ -633,17 +633,17 @@ BOOL CDbxSQLite::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSu
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_META_MERGE_SELECT].pQuery;
sqlite3_bind_int64(stmt, 1, ccSub->contactID);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
while (rc == SQLITE_ROW) {
sqlite3_stmt *stmt2 = evt_stmts[SQL_EVT_STMT_ADDEVENT_SRT].pQuery;
sqlite3_bind_int64(stmt2, 1, sqlite3_column_int64(stmt, 0));
sqlite3_bind_int64(stmt2, 2, ccMeta->contactID);
sqlite3_bind_int64(stmt2, 3, sqlite3_column_int64(stmt, 1));
int rc2 = sqlite3_step(stmt2);
- logError(rc2);
+ logError(rc2, __FILE__, __LINE__);
sqlite3_reset(stmt2);
rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
}
sqlite3_reset(stmt);
@@ -657,7 +657,7 @@ BOOL CDbxSQLite::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *)
sqlite3_stmt *stmt = evt_stmts[SQL_EVT_STMT_META_SPLIT].pQuery;
sqlite3_bind_int64(stmt, 1, ccMeta->contactID);
int rc = sqlite3_step(stmt);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
if (rc != SQLITE_DONE)
return 1;
@@ -708,7 +708,7 @@ MEVENT CDbxSQLiteEventCursor::FetchNext()
return 0;
int rc = sqlite3_step(cursor);
- logError(rc);
+ logError(rc, __FILE__, __LINE__);
if (rc != SQLITE_ROW) {
//empty response
//reset sql cursor