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.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 028ce0e94d..ae0aad2357 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -179,11 +179,21 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, DBEVENTINFO *dbei)
sqlite3_bind_int64(stmt, 3, dbei->timestamp);
rc = sqlite3_step(stmt);
assert(rc == SQLITE_DONE);
- sqlite3_reset(stmt);
+ sqlite3_reset(stmt); //is this necessary ?
cc->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead());
if (ccSub != nullptr)
+ {
+ stmt = evt_stmts_prep[SQL_EVT_STMT_ADDEVENT_SRT];
+ sqlite3_bind_int64(stmt, 1, hDbEvent);
+ sqlite3_bind_int64(stmt, 2, ccSub->contactID);
+ sqlite3_bind_int64(stmt, 3, dbei->timestamp);
+ rc = sqlite3_step(stmt);
+ assert(rc == SQLITE_DONE);
+ sqlite3_reset(stmt); //is this necessary ?
+
ccSub->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead());
+ }
char *module = m_modules.find(dbei->szModule);
if (module == nullptr)