From 469d80a93026540ace538ac145d8829455b9e119 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 19 Oct 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-10-19 --- pc/main.c | 10 +++++++--- port/tcpoutput.c | 11 +++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pc/main.c b/pc/main.c index 230a7de95cfd05d4c5d511c99ca037b62e325ccb..42ef236ae1828334e904e68ad7f916ff9e7cb226 100644 --- a/pc/main.c +++ b/pc/main.c @@ -242,27 +242,31 @@ confinit(void) * size the non-standard memory */ x = 0x12345678; - for(i=1; i<16; i++){ + for(i=2; i<17; i++){ /* * write the word */ l = (long*)(KZERO|(i*MB)); + l--; *l = x; /* * take care of wraps */ - for(j = 0; j < i; j++){ + for(j = 1; j < i; j++){ l = (long*)(KZERO|(j*MB)); - *l = 0; + l--; + *l = ~x; } /* * check */ l = (long*)(KZERO|(i*MB)); + l--; if(*l != x) break; x += 0x3141526; } + i--; conf.base1 = 1*MB; conf.npage1 = (i*MB - conf.base1)/BY2PG; conf.npage = conf.npage0 + conf.npage1; diff --git a/port/tcpoutput.c b/port/tcpoutput.c index 604de235639ca5e4d6c1c4ef4b8e52d31b825688..bbb1f7ee60ef5fcb87b5451289f506914e517077 100644 --- a/port/tcpoutput.c +++ b/port/tcpoutput.c @@ -45,8 +45,12 @@ tcpoutput(Ipconv *s) * window probes to one */ if(tcb->snd.wnd == 0){ - if(sent != 0) - break; + if(sent != 0) { + if (tcb->flags&FORCE) + tcb->snd.ptr = tcb->snd.una; + else + break; + } usable = 1; } else { @@ -176,11 +180,10 @@ tcptimeout(void *arg) s = (Ipconv *)arg; tcb = &s->tcpctl; - switch(tcb->state){ default: tcb->backoff++; - if (tcb->backoff >= MAXBACKOFF) { + if (tcb->backoff >= MAXBACKOFF && tcb->snd.wnd > 0) { localclose(s, Etimedout); break; }