From 1edfe8043003c5ccf6784073f3dd5ece39bc1464 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 13 Mar 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-03-13 --- port/devlance.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/port/devlance.c b/port/devlance.c index b741214ca40bcf565c10a4c085af77bd8c029b55..dbc4b04e7c3349066bf6d78449c5faa9bec5b290 100644 --- a/port/devlance.c +++ b/port/devlance.c @@ -826,11 +826,14 @@ lancekproc(void *arg) /* * The lock on e makes sure the queue is still there. */ - bp = allocb(len); - memcpy(bp->rptr, (uchar *)p, len); - bp->wptr += len; - bp->flags |= S_DELIM; - PUTNEXT(e->q, bp); + if(!waserror()){ + bp = allocb(len); + memcpy(bp->rptr, (uchar *)p, len); + bp->wptr += len; + bp->flags |= S_DELIM; + PUTNEXT(e->q, bp); + poperror(); + } qunlock(e); }