From 06bb93c88b8508cbab3c8e20b7902512bea8a1a9 Mon Sep 17 00:00:00 2001 From: gardners Date: Sun, 25 Aug 2013 21:16:33 +0930 Subject: [PATCH] add extra debug option to trace MDP Rhizome transfer problems. --- conf_schema.h | 1 + overlay_mdp_services.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/conf_schema.h b/conf_schema.h index bed9b4f9..cd10cda0 100644 --- a/conf_schema.h +++ b/conf_schema.h @@ -259,6 +259,7 @@ ATOM(bool_t, rhizome_tx, 0, boolean,, "") ATOM(bool_t, rhizome_rx, 0, boolean,, "") ATOM(bool_t, rhizome_ads, 0, boolean,, "") ATOM(bool_t, rhizome_nohttptx, 0, boolean,, "") +ATOM(bool_t, rhizome_mdp_rx, 0, boolean,, "") ATOM(bool_t, meshms, 0, boolean,, "") ATOM(bool_t, manifests, 0, boolean,, "") ATOM(bool_t, vomp, 0, boolean,, "") diff --git a/overlay_mdp_services.c b/overlay_mdp_services.c index b35fd0dc..a274889c 100644 --- a/overlay_mdp_services.c +++ b/overlay_mdp_services.c @@ -127,6 +127,10 @@ int overlay_mdp_service_rhizomeresponse(overlay_mdp_frame *mdp) RETURN(WHYF("No payload?")); int type=mdp->out.payload[0]; + + if (config.debug.rhizome_mdp_rx) + DEBUGF("Received Rhizome over MDP block, type=%02x",type); + switch (type) { case 'B': /* data block */ case 'T': /* terminal data block */ @@ -139,6 +143,10 @@ int overlay_mdp_service_rhizomeresponse(overlay_mdp_frame *mdp) int count=mdp->out.payload_length-(1+16+8+8); unsigned char *bytes=&mdp->out.payload[1+16+8+8]; + if (config.debug.rhizome_mdp_rx) + DEBUGF("bidprefix=%02x%02x%02x%02x*, offset=%lld, count=%d", + bidprefix[0],bidprefix[1],bidprefix[2],bidprefix[3],offset,count); + /* Now see if there is a slot that matches. If so, then see if the bytes are in the window, and write them.