From 4f7b6281cdb245af9cfc4dbacf34a0e82e5833b1 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 13 Oct 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-10-13 --- ip/il.c | 11 +++++++---- pc/devether.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ip/il.c b/ip/il.c index 117734ee4511af0006ca8c5b674dbb947038c002..680c6590e04db36bfa552643d4707d7647e4e8f7 100644 --- a/ip/il.c +++ b/ip/il.c @@ -57,7 +57,7 @@ enum Iltickms = 50, /* time base */ AckDelay = 2*Iltickms, /* max time twixt message rcvd & ack sent */ MaxTimeout = 4*Seconds, /* max time between rexmit */ - QueryTime = 5*Seconds, /* time between subsequent queries */ + QueryTime = 10*Seconds, /* time between subsequent queries */ DeathTime = 5*QueryTime, MaxRexmit = 16, /* max retransmissions before hangup */ @@ -601,6 +601,7 @@ _ilprocess(Conv *s, Ilhdr *h, Block *bp) ic = (Ilcb*)s->ptcl; ic->lastrecv = msec; + ic->querytime = msec + QueryTime; switch(ic->state) { default: @@ -741,8 +742,10 @@ ilrexmit(Ilcb *ic) nb = copyblock(ic->unacked, blocklen(ic->unacked)); qunlock(&ic->ackq); - if(nb == nil) + if(nb == nil){ + print("ilrexmit: copyblock returns nil\n"); return; + } h = (Ilhdr*)nb->rp; @@ -1200,11 +1203,11 @@ ilnextqt(Ilcb *ic) qlock(&ic->ackq); x = ic->qtx; - ic->qt[x] = ic->next-1; /* highest xmitted packet */ - ic->qt[0] = ic->qt[x]; /* compatibility with old implementations */ if(++x > Nqt) x = 1; ic->qtx = x; + ic->qt[x] = ic->next-1; /* highest xmitted packet */ + ic->qt[0] = ic->qt[x]; /* compatibility with old implementations */ qunlock(&ic->ackq); return x; diff --git a/pc/devether.c b/pc/devether.c index 4ab7c530127a2e75973057a5822d2412a774a6df..3b574de585b4ce888aa90cd216f513dbaefa3032 100644 --- a/pc/devether.c +++ b/pc/devether.c @@ -182,7 +182,8 @@ etheriq(Ether* ether, Block* bp, int freebp) } if(fx){ - qpass(fx->in, bp); + if(qpass(fx->in, bp) < 0) + ether->soverflows++; return 0; } if(freebp){