fixed bug in duplicate detection

This commit is contained in:
gardners 2012-05-26 09:34:12 +09:30
parent 04cc05d6e1
commit c2dfefe764
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ int rhizome_manifest_verify(rhizome_manifest *m)
crypto_hash_sha512(m->manifesthash,m->manifestdata,end_of_text);
/* Read signature blocks from file. */
int ofs=end_of_text;
int ofs=end_of_text;
while(ofs<m->manifest_all_bytes) {
if (debug & DEBUG_RHIZOME) DEBUGF("ofs=0x%x, m->manifest_bytes=0x%x", ofs,m->manifest_all_bytes);
if (rhizome_manifest_extract_signature(m,&ofs)) break;

View File

@ -964,7 +964,7 @@ int rhizome_find_duplicate(const rhizome_manifest *m, rhizome_manifest **found,
}
if (rhizome_read_manifest_file(blob_m, manifestblob, manifestblobsize) == -1) {
WARNF("MANIFESTS row id=%s has invalid manifest blob -- skipped", q_manifestid);
} else if (rhizome_manifest_verify(m)) {
} else if (rhizome_manifest_verify(blob_m)) {
WARNF("MANIFESTS row id=%s fails verification -- skipped", q_manifestid);
} else {
const char *blob_service = rhizome_manifest_get(blob_m, "service", NULL, 0);