diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2020-11-22 22:11:21 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2020-11-22 22:33:09 +0300 |
commit | 1198e47c25e12a4743b97674f254f13c6bc0bead (patch) | |
tree | 941d676e49db4c1c85a1389a775ed9a4e35af7fb /plugins | |
parent | 2eb37fb6f496abec9da2e00bdf937abdcc4555bb (diff) |
someone told me what prev/next only can be called after last/first....
looks like it is not true
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 4b5c3e80de..dd469cdf78 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -571,12 +571,15 @@ MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent) if (!evt_cur_fwd) { - return 0; + evt_cur_fwd = evt_stmts_prep[SQL_EVT_STMT_FINDFIRST]; + sqlite3_bind_int64(evt_cur_fwd, 1, hContact); + + /* return 0; */ } - if (hContact != evt_cnt_fwd) +/* if (hContact != evt_cnt_fwd) { return 0; - } + } */ while (hDbEvent != sqlite3_column_int64(evt_cur_fwd, 0)) { @@ -619,12 +622,14 @@ MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent) if (!evt_cur_backwd) { - return 0; + evt_cur_backwd = evt_stmts_prep[SQL_EVT_STMT_FINDLAST]; + sqlite3_bind_int64(evt_cur_backwd, 1, hContact); + /* return 0; */ } - if (hContact != evt_cnt_backwd) +/* if (hContact != evt_cnt_backwd) { return 0; - } + } */ while (hDbEvent != sqlite3_column_int64(evt_cur_backwd, 0)) { |