From 47945c58121a4cabe4296b6f288d1d020c96a357 Mon Sep 17 00:00:00 2001 From: gardners Date: Sun, 15 Apr 2012 00:03:43 +0930 Subject: [PATCH] cleaned up debug output --- overlay_route.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/overlay_route.c b/overlay_route.c index fa021fa3..2ff3668d 100644 --- a/overlay_route.c +++ b/overlay_route.c @@ -388,21 +388,16 @@ int overlay_get_nexthop(unsigned char *d,unsigned char *nexthop,int *nexthoplen, if (neh->scores[i]>neh->scores[*interface]) *interface=i; } if (neh->scores[*interface]<1) { - if (debug>DEBUG_OVERLAYROUTING) { - int i; - fprintf(stderr,"No open path to "); - for(i=0;inode->sid[i]); - fprintf(stderr,"\n"); - } + if (debug>DEBUG_OVERLAYROUTING) + fprintf(stderr,"No open path to %s\n",overlay_render_sid(neh->node->sid)); return WHY("No open path to node"); } + if (0) printf("nexthop is %s\n",overlay_render_sid(nexthop)); return 0; } else { /* Is not a direct neighbour */ return WHY("Calculating next-hop destination for nodes that are not direct neighbours is not yet implemented"); } - - return WHY("Not implemented"); } unsigned int overlay_route_hash_sid(unsigned char *sid)