From 6a9167e5658540da996bc6e45dc6dd5bcd107f7a Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 15 Apr 2025 12:49:40 -0400 Subject: [PATCH] ssb: More logging to help track down an issue I've seen on rare occasion when saving app changes from the editor. --- src/ssb.db.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ssb.db.c b/src/ssb.db.c index 9b703fc1b..5c7312fa2 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -946,7 +946,12 @@ bool tf_ssb_db_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char* { if (sqlite3_bind_text(statement, 1, id, -1, NULL) == SQLITE_OK && sqlite3_bind_blob(statement, 2, blob, size, NULL) == SQLITE_OK) { - result = sqlite3_step(statement) == SQLITE_DONE; + int r = sqlite3_step(statement); + result = r == SQLITE_DONE; + if (!result) + { + tf_printf("Blob store failed: %s.", sqlite3_errmsg(db)); + } rows = sqlite3_changes(db); } else