mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-10 04:19:58 +00:00
Treat empty filehash the same as NULL
This commit is contained in:
parent
8accabfcac
commit
b916363b40
@ -281,7 +281,7 @@ int rhizome_add_manifest(rhizome_manifest *m_in,int ttl)
|
||||
if (m_in->version < storedversion)
|
||||
return WHY("Newer version exists");
|
||||
if (m_in->version == storedversion)
|
||||
return WHY("Same version of manifest exists, not adding");
|
||||
return WHYF("Already have %s:%"PRId64", not adding", id, m_in->version);
|
||||
break;
|
||||
default:
|
||||
return WHY("Select found too many rows!");
|
||||
|
@ -1520,9 +1520,9 @@ static int is_interesting(const char *id_hex, int64_t version)
|
||||
if (sqlite_step_retry(&retry, statement) == SQLITE_ROW){
|
||||
const char *q_filehash = (const char *) sqlite3_column_text(statement, 0);
|
||||
ret=0;
|
||||
if (q_filehash && !rhizome_exists(q_filehash))
|
||||
if (q_filehash && *q_filehash && !rhizome_exists(q_filehash))
|
||||
ret=1;
|
||||
}
|
||||
}
|
||||
sqlite3_finalize(statement);
|
||||
|
||||
RETURN(ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user