From 152d46ddb61ab681746299860cb2392ed5b4deaf Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Fri, 27 Jul 2012 14:59:01 +0930 Subject: [PATCH] Reduce and improve logging --- rhizome.c | 7 +------ rhizome_packetformats.c | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rhizome.c b/rhizome.c index 3b39064d..c7d16ae2 100644 --- a/rhizome.c +++ b/rhizome.c @@ -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; } diff --git a/rhizome_packetformats.c b/rhizome_packetformats.c index 8e0cbaad..897f1c44 100644 --- a/rhizome_packetformats.c +++ b/rhizome_packetformats.c @@ -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; }