ssb: Add entries to the blob wants cache when requesting a missing blob from the web. #120
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 34m7s

This commit is contained in:
2025-05-17 12:46:47 -04:00
parent 476fec2757
commit e3fcdea362
3 changed files with 47 additions and 1 deletions

View File

@ -1170,7 +1170,12 @@ static void _httpd_endpoint_view_work(tf_ssb_t* ssb, void* user_data)
}
else
{
tf_ssb_db_blob_get(ssb, blob_id, (uint8_t**)&view->data, &view->size);
if (!tf_ssb_db_blob_get(ssb, blob_id, (uint8_t**)&view->data, &view->size))
{
sqlite3* db = tf_ssb_acquire_db_writer(ssb);
tf_ssb_db_add_blob_wants(db, blob_id);
tf_ssb_release_db_writer(ssb, db);
}
}
}
}