From 5d7017712c943bc815e4c6952af4557c54ade67e Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 27 Apr 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-04-27 --- pc/ether509.c | 2 +- port/auth.c | 2 ++ port/tcpoutput.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pc/ether509.c b/pc/ether509.c index f959b71e9df3ec1ccbbf18f352cba1de12df0151..7f60b39608f21da87cac650f954de738f012a7ac 100644 --- a/pc/ether509.c +++ b/pc/ether509.c @@ -331,7 +331,7 @@ transmit(Ctlr *ctlr) * we need 4 bytes for the preamble. */ len = ROUNDUP(tb->len, 4); - if(len > ins(ctlr->card.io+TxFreeBytes)+4){ + if(len+4 > ins(ctlr->card.io+TxFreeBytes)){ COMMAND(ctlr, SetTxAvailable, len); break; } diff --git a/port/auth.c b/port/auth.c index c5e7ec738fa826a85cd91b132474a5cbf1014daa..736ac1a8a1c24fb7767c30d47257063248c8f0af 100644 --- a/port/auth.c +++ b/port/auth.c @@ -150,6 +150,7 @@ sysfsession(ulong *arg) poperror(); if(convM2S(buf, &f, n) == 0){ unlock(&s->send); +print("error converting %d bytes %ux %ux %ux\n", n, buf[0], buf[1], buf[2]); error(Emountrpc); } switch(f.type){ @@ -163,6 +164,7 @@ sysfsession(ulong *arg) error(f.ename); default: unlock(&s->send); +print("error using %d bytes %ux %ux %ux\n", n, buf[0], buf[1], buf[2]); error(Emountrpc); } } diff --git a/port/tcpoutput.c b/port/tcpoutput.c index 0b34e33db8d78e501b27cbe04bbd568c0e9a7b89..44a125c18e831062982e7f78660a48711796d065 100644 --- a/port/tcpoutput.c +++ b/port/tcpoutput.c @@ -184,6 +184,7 @@ tcptimeout(void *arg) default: tcb->backoff++; if (tcb->backoff >= MAXBACKOFF && tcb->snd.wnd > 0) { +print("tcp connection timed out\n"); localclose(s, Etimedout); break; }