From a185ded47e85bc834b324f8dda6a7306ae168a48 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 26 Nov 2023 18:01:43 +0000 Subject: [PATCH] Exclude the sequence number from the request in the response to createHistoryStream and ebt.replicate. I believe I had done this to match a broken client when I implemented it. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4647 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.rpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssb.rpc.c b/src/ssb.rpc.c index f0ac5d6f..3406dd87 100644 --- a/src/ssb.rpc.c +++ b/src/ssb.rpc.c @@ -760,7 +760,7 @@ static void _tf_ssb_connection_send_history_stream_work(tf_ssb_connection_t* con sqlite3* db = tf_ssb_acquire_db_reader(ssb); sqlite3_stmt* statement; const int k_max = 32; - if (sqlite3_prepare(db, "SELECT previous, author, id, sequence, timestamp, hash, content, signature, sequence_before_author FROM messages WHERE author = ?1 AND sequence >= ?2 AND sequence < ?3 ORDER BY sequence", -1, &statement, NULL) == SQLITE_OK) + if (sqlite3_prepare(db, "SELECT previous, author, id, sequence, timestamp, hash, content, signature, sequence_before_author FROM messages WHERE author = ?1 AND sequence > ?2 AND sequence < ?3 ORDER BY sequence", -1, &statement, NULL) == SQLITE_OK) { if (sqlite3_bind_text(statement, 1, request->author, -1, NULL) == SQLITE_OK && sqlite3_bind_int64(statement, 2, request->sequence) == SQLITE_OK && @@ -835,7 +835,7 @@ static void _tf_ssb_connection_send_history_stream_after_work(tf_ssb_connection_ } if (!request->out_finished) { - _tf_ssb_connection_send_history_stream(connection, request->request_number, request->author, request->out_max_sequence_seen + 1, request->keys, request->live); + _tf_ssb_connection_send_history_stream(connection, request->request_number, request->author, request->out_max_sequence_seen, request->keys, request->live); } else if (!request->live) {