~kris/9p

9hist

9882d6055240519e4a165d63efa239127fde4cf0 — David du Colombier 34 years ago d54baa1
Plan 9 from Bell Labs 1992-03-16
1 files changed, 6 insertions(+), 6 deletions(-)

M port/devlance.c
M port/devlance.c => port/devlance.c +6 -6
@@ 281,21 281,20 @@ lanceoput(Queue *q, Block *bp )

	if(bp->type == M_CTL){
		e = q->ptr;
		qlock(&l);
		if(streamparse("connect", bp)){
			if(e->type == -1)
				l.all--;
			e->type = strtol((char *)bp->rptr, 0, 0);
			if(e->type == -1){
				qlock(&l);
			if(e->type == -1)
				l.all++;
				qunlock(&l);
			}
		} else if(streamparse("promiscuous", bp)) {
			e->prom = 1;
			qlock(&l);
			l.prom++;
			if(l.prom == 1)
				lancestart(PROM, 1);/**/
			qunlock(&l);
		}
		qunlock(&l);
		freeb(bp);
		return;
	}


@@ 351,6 350,7 @@ lanceoput(Queue *q, Block *bp )
		l.misses = 0;
		print("lance wedged, restarting\n");
		lancestart(0, 0);
		qunlock(&l.tlock);
		freeb(bp);
		return;		/* the interrupt routine will qunlock(&l.tlock) */
	}