Reduce and improve logging

This commit is contained in:
Jeremy Lakeman 2012-07-27 14:59:01 +09:30
parent 409186eced
commit 152d46ddb6
2 changed files with 3 additions and 8 deletions

View File

@ -390,11 +390,6 @@ time_ms_t rhizome_voice_timeout = -1;
int rhizome_saw_voice_traffic()
{
/* We are in "voice mode" for a second after sending a voice frame */
time_ms_t now = gettime_ms();
if (rhizome_voice_timeout < now) {
INFO("Suppressing Rhizome due to voice traffic");
rhizome_voice_timeout = now + 1000;
}
rhizome_voice_timeout=gettime_ms()+1000;
return 0;
}

View File

@ -340,8 +340,8 @@ int overlay_rhizome_saw_advertisements(int i,overlay_frame *f, long long now)
ofs++;
break;
}
if (ofs+manifest_length>f->payload->length) {
WHY("Illegal manifest length field in rhizome advertisement frame.");
if (manifest_length>f->payload->length - ofs) {
WHYF("Illegal manifest length field in rhizome advertisement frame %d vs %d.", manifest_length, f->payload->length - ofs);
break;
}