diff --git a/rhizome_bundle.c b/rhizome_bundle.c index 44f2c0b3..2f067318 100644 --- a/rhizome_bundle.c +++ b/rhizome_bundle.c @@ -152,7 +152,13 @@ int rhizome_read_manifest_file(rhizome_manifest *m, const char *filename, int bu { /* Parse hex string of ID into public key */ rhizome_hex_to_bytes(value,m->cryptoSignPublic, - crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES*2); + crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES*2); + } + if ((!strcasecmp(var,"ID"))||(!strcasecmp(var,"FILEHASH"))) { + /* Also force to upper case to avoid case sensitive comparison problems later. */ + int i; + for(i=0;ivars[m->var_count]);i++) + m->values[m->var_count][i]=toupper(m->values[m->var_count][i]); } m->var_count++; } diff --git a/rhizome_fetch.c b/rhizome_fetch.c index df262aba..f4058f35 100644 --- a/rhizome_fetch.c +++ b/rhizome_fetch.c @@ -375,9 +375,12 @@ int rhizome_suggest_queue_manifest_import(rhizome_manifest *m, return -1; } else { if (1||debug&DEBUG_RHIZOMESYNC) { - DEBUGF("manifest id=%s, version=%lld is new to us.", - rhizome_manifest_get(m,"id",NULL,0), - rhizome_manifest_get_ll(m,"version")); + long long stored_version + =sqlite_exec_int64("select version from manifests where id='%s'",id); + DEBUGF("manifest id=%s, version=%lld is new to us (we only have version %lld).", + rhizome_manifest_get(m,"id",NULL,0), + rhizome_manifest_get_ll(m,"version"), + stored_version); } }