From a7d42b3c73c2bd5eaeba03e197c7422ed8f79738 Mon Sep 17 00:00:00 2001 From: gardners <paul@servalproject.org> Date: Fri, 21 Sep 2012 14:31:14 +0200 Subject: [PATCH] added note contemplating about where parsing of rhizome direct responses should occur. #9 --- rhizome_direct_http.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/rhizome_direct_http.c b/rhizome_direct_http.c index b4333941..d12a4ad2 100644 --- a/rhizome_direct_http.c +++ b/rhizome_direct_http.c @@ -740,10 +740,21 @@ void rhizome_direct_http_dispatch(rhizome_direct_sync_request *r) close(sock); goto end; } - DEBUGF("XXX Reading enquiry response for processing"); DEBUGF("content_length=%d",content_length); dump("response",(unsigned char *)p,content_length); + /* We now have the list of 9-byte records that indicate the list of BAR prefixes + that differ between the two nodes. We can now action those which are relevant, + i.e., based on whether we are pushing, pulling or synchronising (both). + + I am currently undecided as to whether it is cleaner to have some general + rhizome direct function for doing that, or whether it just adds unnecessary + complication, and the responses should just be handled in here. + + For now, I am just going to implement it in here, and we can generalise later. + */ + DEBUGF("XXX Need to parse responses into actions"); + end: /* Warning: tail recursion when done this way. Should be triggered by an asynchronous event.