From 9398f94a228da2b583a6709a04991f9a2a5d4e36 Mon Sep 17 00:00:00 2001 From: gardners Date: Sat, 14 Apr 2012 09:39:14 +0930 Subject: [PATCH] Cleaned up debug output. --- overlay_interface.c | 3 ++- overlay_mdp.c | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/overlay_interface.c b/overlay_interface.c index c410c151..6a3a630c 100644 --- a/overlay_interface.c +++ b/overlay_interface.c @@ -786,7 +786,8 @@ int overlay_tick_interface(int i, long long now) workLeft=1; break; } } if (!workLeft) { - WHY("Leaving broadcast payload on the queue for other interfaces"); + if (debug&DEBUG_BROADCASTS) + WHY("Leaving broadcast payload on the queue for other interfaces"); break; } } diff --git a/overlay_mdp.c b/overlay_mdp.c index a6688494..98988a80 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -325,7 +325,6 @@ int overlay_saw_mdp_frame(int interface, overlay_mdp_frame *mdp,long long now) send back a connection refused type message? Silence is probably the more prudent path. */ - dump("mdp dst",&mdp->out.dst.sid[0],SID_SIZE); if ((!overlay_address_is_local(mdp->out.dst.sid)) &&(!overlay_address_is_broadcast(mdp->out.dst.sid))) { @@ -336,7 +335,6 @@ int overlay_saw_mdp_frame(int interface, overlay_mdp_frame *mdp,long long now) { if (!memcmp(&mdp->out.dst,&mdp_bindings[i],sizeof(sockaddr_mdp))) { /* exact and specific match, so stop searching */ - WHY("Found binding"); match=i; break; } else { /* No exact match, so see if the port matches, and local-side address @@ -514,7 +512,6 @@ int overlay_mdp_dispatch(overlay_mdp_frame *mdp,int userGeneratedFrameP, if (!broadcast) { /* Is local, and is not broadcast, so shouldn't get sent out on the wire. */ - WHY("non-broadcast packet delivered locally"); return 0; } } @@ -648,7 +645,7 @@ int overlay_mdp_dispatch(overlay_mdp_frame *mdp,int userGeneratedFrameP, return WHY("Error enqueuing frame"); } else { - WHY("queued frame"); + if (debug&DEBUG_OVERLAYINTERFACES) WHY("queued frame"); return 0; } } @@ -748,8 +745,7 @@ int overlay_mdp_poll() fcntl(mdp_named_socket, F_GETFL, NULL)&(~O_NONBLOCK)); } - if (!(random()&0xff)) WHY("Not implemented"); - return -1; + return 0; } int overlay_mdp_relevant_bytes(overlay_mdp_frame *mdp)