Reduce rhizome MDP debug messages

This commit is contained in:
Jeremy Lakeman 2013-09-17 10:58:21 +09:30
parent ed21200289
commit 9f1407043a

View File

@ -1337,16 +1337,14 @@ int rhizome_received_content(unsigned char *bidprefix,
int count,unsigned char *bytes,int type)
{
IN();
if (config.debug.rhizome)
DEBUGF("Rhizome over MDP receiving %d bytes.",count);
if (!is_rhizome_mdp_enabled()) {
if (config.debug.rhizome)
DEBUGF("Rhizome over MDP is not enabled");
RETURN(-1);
}
struct rhizome_fetch_slot *slot=fetch_search_slot(bidprefix, 16);
if (slot && slot->bidVersion == version && slot->state == RHIZOME_FETCH_RXFILEMDP){
if (config.debug.rhizome)
DEBUGF("Rhizome over MDP receiving %d bytes.",count);
if (rhizome_random_write(&slot->write_state, offset, bytes, count)){
if (config.debug.rhizome)
DEBUGF("Write failed!");
@ -1368,10 +1366,6 @@ int rhizome_received_content(unsigned char *bidprefix,
rhizome_fetch_mdp_requestblocks(slot);
}
RETURN(0);
} else {
if (config.debug.rhizome)
DEBUGF("Ignoring received block: slot=%p, version=%016"PRIx64", slot->bidVersion=%016"PRIx64", slot->state=%d (should be %d)",
slot,version,slot?slot->bidVersion:0,slot?slot->state:-999,RHIZOME_FETCH_RXFILEMDP);
}
// if we get a packet containing an entire payload