From 0cb65c4a870edede6fdde09c6f3c501214736a18 Mon Sep 17 00:00:00 2001 From: gardners Date: Tue, 13 Sep 2011 02:59:48 +0930 Subject: [PATCH] Cleaned up other references to interface in overlay_node_observation. Tidied up output format when reporting observed links. --- mphlr.h | 2 +- overlay_route.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mphlr.h b/mphlr.h index ff04e1f8..1ee845c7 100644 --- a/mphlr.h +++ b/mphlr.h @@ -793,7 +793,7 @@ int overlay_abbreviate_lookup_sender_id(); int ob_dump(overlay_buffer *b,char *desc); unsigned int ob_get_int(overlay_buffer *b,int offset); char *overlay_render_sid(unsigned char *sid); -int overlay_route_record_link(long long now,unsigned char *to,unsigned char *via,unsigned int timestamp,int score,int interface,int gateways_en_route); +int overlay_route_record_link(long long now,unsigned char *to,unsigned char *via,unsigned int timestamp,int score,int gateways_en_route); int overlay_route_dump(); int overlay_route_tick(); int overlay_route_tick_neighbour(int neighbour_id,long long now); diff --git a/overlay_route.c b/overlay_route.c index c9478e17..ec1cc0f4 100644 --- a/overlay_route.c +++ b/overlay_route.c @@ -814,18 +814,19 @@ int overlay_route_saw_selfannounce_ack(int interface,overlay_frame *f,long long // Call something like the following for each link if (f->source_address_status==OA_RESOLVED) - overlay_route_record_link(now,f->source,f->source,timestamp,score,interface,0 /* no gateways in between */); + overlay_route_record_link(now,f->source,f->source,timestamp,score, + 0 /* no gateways in between */); } return 0; } -int overlay_route_record_link(long long now,unsigned char *to,unsigned char *via,unsigned int timestamp,int score,int interface,int gateways_en_route) +int overlay_route_record_link(long long now,unsigned char *to,unsigned char *via,unsigned int timestamp,int score,int gateways_en_route) { - fprintf(stderr,"route_record_link(0x%llx,%s,", - now,overlay_render_sid(to)); - fprintf(stderr,"%s,0x%08x,%d,%d)\n", - overlay_render_sid(via),timestamp,score,interface); + fprintf(stderr,"route_record_link(0x%llx,%s*,", + now,overlay_render_sid_prefix(to,7)); + fprintf(stderr,"%s*,0x%08x,%d)\n", + overlay_render_sid_prefix(via,7),timestamp,score); overlay_node *n=overlay_route_find_node(to,1 /* create node if missing */); if (!n) return WHY("Could not find or create entry for node");