mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
fixed bug where <1KB manifests would get found in 0-1K and 1K-2K
buckets. Also removed some debugging. #9
This commit is contained in:
parent
8aa18db913
commit
90fd7e3fd8
@ -648,7 +648,7 @@ int rhizome_direct_bundle_iterator_unpickle_range(rhizome_direct_bundle_cursor *
|
||||
/* Get start of range */
|
||||
r->size_high=1LL<<pickled[0];
|
||||
r->size_low=(r->size_high/2)+1;
|
||||
if (r->size_low<=1024) r->size_low=0;
|
||||
if (r->size_high<=1024) r->size_low=0;
|
||||
for(v=0;v<4;v++) r->bid_low[v]=pickled[1+v];
|
||||
for(;v<RHIZOME_MANIFEST_ID_BYTES;v++) r->bid_low[v]=0x00;
|
||||
|
||||
@ -715,8 +715,9 @@ int rhizome_direct_bundle_iterator_fill(rhizome_direct_bundle_cursor *c,int max_
|
||||
if (!stuffed_now) {
|
||||
/* no more matches in this size bin, so move up a size bin */
|
||||
c->size_low=c->size_high+1;
|
||||
if (c->size_low<=1025) c->size_low=0;
|
||||
c->size_high*=2;
|
||||
if (c->size_high<=1024) c->size_low=0;
|
||||
DEBUGF("size=%lld..%lld",c->size_low,c->size_high);
|
||||
/* Record that we covered to the end of that size bin */
|
||||
memset(c->bid_high,0xff,RHIZOME_MANIFEST_ID_BYTES);
|
||||
if (c->size_high>c->limit_size_high)
|
||||
|
@ -904,7 +904,6 @@ void rhizome_direct_http_dispatch(rhizome_direct_sync_request *r)
|
||||
// unsigned char *bid_prefix=(unsigned char *)&p[i+1];
|
||||
unsigned long long
|
||||
bid_prefix_ll=rhizome_bar_bidprefix_ll((unsigned char *)&actionlist[i+1]);
|
||||
dump("response",(unsigned char *)actionlist,content_length);
|
||||
DEBUGF("%s %016llx* @ 0x%x",type==1?"push":"pull",bid_prefix_ll,i);
|
||||
if (type==2&&r->pullP) {
|
||||
/* Need to fetch manifest. Once we have the manifest, then we can
|
||||
|
Loading…
Reference in New Issue
Block a user