From 093f148752b7fe2ae062112c831e3898a7a63cea Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Wed, 18 Dec 2013 15:24:37 -0800 Subject: [PATCH] Refs #101053 Update to window management algorithm. --- csrc/cmd/ccncatchunks2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csrc/cmd/ccncatchunks2.c b/csrc/cmd/ccncatchunks2.c index e71282ca1a..6e0e8879d6 100644 --- a/csrc/cmd/ccncatchunks2.c +++ b/csrc/cmd/ccncatchunks2.c @@ -321,12 +321,12 @@ incoming_content(struct ccn_closure *selfp, return(CCN_UPCALL_RESULT_OK); md->interests_sent++; if (start == end) { - /* No InterestLifetime so it's the second timeout, decrease the window */ + /* No InterestLifetime: second timeout, decrease the window significantly */ md->timeouts++; if (md->curwindow >= 2) md->curwindow /= 2; return(CCN_UPCALL_RESULT_REEXPRESS); } else { - /* InterestLifetime, remove it, consider it a hole, don't lower the window */ + /* InterestLifetime, remove it, consider it a hole, decrease the window slightly */ ccn_charbuf_reset(md->tname); ccn_charbuf_append(md->tname, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name], info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]); @@ -336,7 +336,7 @@ incoming_content(struct ccn_closure *selfp, info->pi->offset[CCN_PI_E] - end); res = ccn_express_interest(md->h, md->tname, selfp, md->templ); if (res < 0) abort(); - // if (md->curwindow > 1) md->curwindow--; + if (md->curwindow > 1) md->curwindow--; md->holes++; return(CCN_UPCALL_RESULT_OK); }