mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Only drop BAR's from the sync if they are no longer interesting
This commit is contained in:
parent
1d88df594b
commit
64fe96ebfa
@ -624,8 +624,8 @@ int rhizome_update_file_priority(const char *fileid);
|
||||
enum rhizome_bundle_status rhizome_find_duplicate(const rhizome_manifest *m, rhizome_manifest **found);
|
||||
int rhizome_manifest_to_bar(rhizome_manifest *m,unsigned char *bar);
|
||||
uint64_t rhizome_bar_version(const unsigned char *bar);
|
||||
uint64_t rhizome_bar_bidprefix_ll(unsigned char *bar);
|
||||
int rhizome_is_bar_interesting(unsigned char *bar);
|
||||
uint64_t rhizome_bar_bidprefix_ll(const unsigned char *bar);
|
||||
int rhizome_is_bar_interesting(const unsigned char *bar);
|
||||
int rhizome_is_manifest_interesting(rhizome_manifest *m);
|
||||
int rhizome_retrieve_manifest(const rhizome_bid_t *bid, rhizome_manifest *m);
|
||||
int rhizome_retrieve_manifest_by_prefix(const unsigned char *prefix, unsigned prefix_len, rhizome_manifest *m);
|
||||
|
@ -2089,7 +2089,7 @@ static int is_interesting(const char *id_hex, uint64_t version)
|
||||
OUT();
|
||||
}
|
||||
|
||||
int rhizome_is_bar_interesting(unsigned char *bar)
|
||||
int rhizome_is_bar_interesting(const unsigned char *bar)
|
||||
{
|
||||
uint64_t version = rhizome_bar_version(bar);
|
||||
char id_hex[RHIZOME_BAR_PREFIX_BYTES *2 + 2];
|
||||
|
@ -129,7 +129,7 @@ uint64_t rhizome_bar_version(const unsigned char *bar)
|
||||
|
||||
/* This function only displays the first 8 bytes, and should not be used
|
||||
for comparison. */
|
||||
uint64_t rhizome_bar_bidprefix_ll(unsigned char *bar)
|
||||
uint64_t rhizome_bar_bidprefix_ll(const unsigned char *bar)
|
||||
{
|
||||
uint64_t bidprefix=0;
|
||||
int i;
|
||||
|
@ -388,6 +388,7 @@ static void sync_send_response(struct subscriber *dest, int forwards, uint64_t t
|
||||
|
||||
if (rowid>max_token){
|
||||
// a new bundle has been imported
|
||||
if (!rhizome_is_bar_interesting(bar))
|
||||
rhizome_sync_bundle_inserted(bar);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user