mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Reduce log spam
This commit is contained in:
parent
de8ffd7ea9
commit
1a26a3e452
@ -975,16 +975,11 @@ int64_t rhizome_database_create_blob_for(const char *hashhex,int64_t fileLength,
|
||||
sqlite3_errmsg(rhizome_db));
|
||||
goto insert_row_fail;
|
||||
}
|
||||
DEBUGF("INSERT OR REPLACE INTO FILES(id,length,highestpriority,datavalid,inserttime) VALUES('%s',%lld,%d,0,%lld);",
|
||||
hashhex, (long long)fileLength, priority, (long long)gettime_ms()
|
||||
);
|
||||
|
||||
|
||||
sqlite3_stmt *statement = sqlite_prepare(&retry,"INSERT OR REPLACE INTO FILEBLOBS(id,data) VALUES('%s',?)",hashhex);
|
||||
DEBUGF("INSERT OR REPLACE INTO FILEBLOBS(id,data) VALUES('%s',?)",hashhex);
|
||||
if (!statement)
|
||||
goto insert_row_fail;
|
||||
|
||||
|
||||
/* Bind appropriate sized zero-filled blob to data field */
|
||||
if (sqlite3_bind_zeroblob(statement, 1, fileLength) != SQLITE_OK) {
|
||||
WHYF("sqlite3_bind_zeroblob() failed: %s: %s", sqlite3_errmsg(rhizome_db), sqlite3_sql(statement));
|
||||
|
@ -748,8 +748,6 @@ rhizome_fetch(struct rhizome_fetch_slot *slot, rhizome_manifest *m, const struct
|
||||
bcopy(peersid,slot->peer_sid,SID_SIZE);
|
||||
bcopy(m->cryptoSignPublic,slot->bid,RHIZOME_MANIFEST_ID_BYTES);
|
||||
slot->bidVersion=m->version;
|
||||
DEBUGF("request bid=%s, version=0x%llx",
|
||||
alloca_tohex_bid(slot->bid),slot->bidVersion);
|
||||
slot->bidP=1;
|
||||
|
||||
/* Don't provide a filename, because we will stream the file straight into
|
||||
@ -761,7 +759,8 @@ rhizome_fetch(struct rhizome_fetch_slot *slot, rhizome_manifest *m, const struct
|
||||
return -1;
|
||||
}
|
||||
if (config.debug.rhizome_rx)
|
||||
DEBUGF(" started fetch into %s, slot=%d filehash=%s", slot->manifest->dataFileName, slotno(slot), m->fileHexHash);
|
||||
DEBUGF(" started fetch bid %s version 0x%llx into %s, slot=%d filehash=%s",
|
||||
alloca_tohex_bid(slot->bid), slot->bidVersion, slot->manifest->dataFileName, slotno(slot), m->fileHexHash);
|
||||
return STARTED;
|
||||
}
|
||||
|
||||
@ -1003,8 +1002,8 @@ int rhizome_suggest_queue_manifest_import(rhizome_manifest *m, const struct sock
|
||||
|
||||
static int rhizome_fetch_close(struct rhizome_fetch_slot *slot)
|
||||
{
|
||||
// if (config.debug.rhizome_rx)
|
||||
DEBUGF("close Rhizome fetch slot=%d", slotno(slot));
|
||||
if (config.debug.rhizome_rx)
|
||||
DEBUGF("close Rhizome fetch slot=%d", slotno(slot));
|
||||
assert(slot->state != RHIZOME_FETCH_FREE);
|
||||
|
||||
/* close socket and stop watching it */
|
||||
|
Loading…
Reference in New Issue
Block a user