From bc11b16d96a039bb968c56e2b4dfe1b184587d79 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Tue, 17 Jul 2012 15:33:04 +0930 Subject: [PATCH 1/2] Remove spurious DEBUG() statement --- rhizome_database.c | 1 - 1 file changed, 1 deletion(-) diff --git a/rhizome_database.c b/rhizome_database.c index 3d8ff4b2..8cb8752c 100644 --- a/rhizome_database.c +++ b/rhizome_database.c @@ -697,7 +697,6 @@ int rhizome_list_manifests(const char *service, const char *sender_sid, const ch break; } const char *q_manifestid = (const char *) sqlite3_column_text(statement, 0); - DEBUGF("id = %s", q_manifestid); const char *manifestblob = (char *) sqlite3_column_blob(statement, 1); size_t manifestblobsize = sqlite3_column_bytes(statement, 1); // must call after sqlite3_column_blob() long long q_version = sqlite3_column_int64(statement, 2); From 3c09a1ec7d48878149b5adec51c13976f54b85b5 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Tue, 17 Jul 2012 18:07:02 +0930 Subject: [PATCH 2/2] Fix broken log WARN messages in "rhizome list" --- rhizome_database.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rhizome_database.c b/rhizome_database.c index 8cb8752c..ec394ba2 100644 --- a/rhizome_database.c +++ b/rhizome_database.c @@ -1078,20 +1078,20 @@ int rhizome_find_duplicate(const rhizome_manifest *m, rhizome_manifest **found, ++inconsistent; } if (blob_filesize != -1 && blob_filesize != m->fileLength) { - WARNF("MANIFESTS row id=%s joined to FILES row id=%s has inconsistent blob: known file size %lld, blob.filesize=%lld -- skipped", - q_manifestid, m->fileHexHash, m->fileLength, blob_filesize); + WARNF("MANIFESTS row id=%s has inconsistent blob: known file size %lld, blob.filesize=%lld -- skipped", + q_manifestid, m->fileLength, blob_filesize); ++inconsistent; } if (m->fileLength != 0) { if (!blob_filehash && strcasecmp(blob_filehash, m->fileHexHash)) { - WARNF("MANIFESTS row id=%s joined to FILES row id=%s has inconsistent blob: blob.filehash=%s -- skipped", + WARNF("MANIFESTS row id=%s has inconsistent blob: manifests.filehash=%s, blob.filehash=%s -- skipped", q_manifestid, m->fileHexHash, blob_filehash); ++inconsistent; } } else { - if (!blob_filehash) { - WARNF("MANIFESTS row id=%s joined to FILES row id=%s has inconsistent blob: blob.filehash should be absent -- skipped", - q_manifestid, m->fileHexHash); + if (blob_filehash) { + WARNF("MANIFESTS row id=%s has inconsistent blob: blob.filehash should be absent -- skipped", + q_manifestid); ++inconsistent; } }