summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2019-05-20 11:13:34 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2019-06-05 16:24:36 +0300
commitf6e7c1be2d87482b20d242cc029085dc10cfee86 (patch)
tree9187b52e6046a746387581b73d6420de9751351d /plugins/Dbx_sqlite/src
parent38fc38f1c21436b3686221fd2b25f3705f2e1855 (diff)
dbx_sqlite: add record to srt table for subcontact
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-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)