Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp
Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!sun!shannon
From: shannon@sun.uucp (Bill Shannon)
Newsgroups: net.bugs.uucp
Subject: another gross uucp packet driver bug
Message-ID: <2587@sun.uucp>
Date: Fri, 9-Aug-85 04:21:01 EDT
Article-I.D.: sun.2587
Posted: Fri Aug  9 04:21:01 1985
Date-Received: Mon, 12-Aug-85 06:32:49 EDT
Distribution: net
Organization: Sun Microsystems, Inc.
Lines: 24

I think I've found another gross bug in the uucp packet driver.
In pk1.c/pkopen() at the beginning it does:

	if (++pkactive >= NPLINES)
		return (NULL);

This is the only place pkactive is used.  If you try to call
more than NPLINES systems during one execution of uucico,
pkopen will fail, causing the "FAILED (startup)" error message.
This code seems to be left over from when the packet driver
was put in the kernel and it wanted to limit the number of lines
that were running the packet driver.  There's even a data structure,
pklines, that holds pointers to the NPLINES possible open lines.
However, no one uses that data structure except a routine that
takes a packet pointer and returns an index into that data structure,
but no one calls that routine!

Yuck, what a mess!  Does anyone know of any reason that all this
glop shouldn't just be pulled out?  The only thing I'm worried
about is that when the packet driver is closed, it may not free
all the dynamically allocated storage it used.  The above gross
code at least puts a limit on the amount of wasted storage.

					Bill Shannon