From fb7edbe76a928d134fd334e5bad68e32096e0424 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 2 Oct 2023 14:15:18 +0300 Subject: =?UTF-8?q?fixes=20#3700=20)dbx=5Fsqlite:=20=D1=83=D0=B4=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B8=D1=81=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=BC=D0=B5=D1=82=D0=B0=D0=BA=D0=BE=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=B0=20=D0=BE=D1=81=D1=82=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D0=B5=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/Dbx_sqlite/src/dbevents.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp') diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 70766e48b1..ac2261c60d 100644 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -198,11 +198,10 @@ int CDbxSQLite::DeleteEventSrt(MCONTACT hContact, int64_t ts) return rc; } -int CDbxSQLite::DeleteEventSrt2(MCONTACT hContact, MEVENT hDbEvent) +int CDbxSQLite::DeleteEventSrt2(MEVENT hDbEvent) { - auto *stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ? AND id = ?;", qEvDelSrt2); - sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_int64(stmt, 2, hDbEvent); + auto *stmt = InitQuery("DELETE FROM events_srt WHERE id = ?;", qEvDelSrt2); + sqlite3_bind_int64(stmt, 1, hDbEvent); int rc = sqlite3_step(stmt); logError(rc, __FILE__, __LINE__); sqlite3_reset(stmt); @@ -239,7 +238,7 @@ BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent) if (rc != SQLITE_DONE) return 1; - rc = DeleteEventSrt2(hContact, hDbEvent); + rc = DeleteEventSrt2(hDbEvent); if (rc != SQLITE_DONE) return 1; -- cgit v1.2.3