[net.bugs.uucp] bug in pk1.c

aegl@edee.UUCP (Tony Luck) (11/25/83)

In some versions of uucp (I am not sure which, as the ones we have here
are all of very uncertain parentage) there is an erroneous ASSERTion that
causes uucico to give up after a timeout. The problem is at the end of the
function 'pkgetpack'  code follows:

OLD:
	ret = pkcget(pk->p_ifn, (char *) bp, pk->p_rsize);
	PKASSERT(ret != -1, "PKGETPKT CAN't READ %d", ret);
	pkdata(h->cntl, h->sum, pk, (char *) bp);
	return;

NEW:
	ret = pkcget(pk->p_ifn, (char *) bp, pk->p_rsize);
	if (ret == 0)
		pkdata(h->cntl, h->sum, pk, (char *) bp);
	return;

This has been fixed in at least one version here (apologies if the fix was
obtained from the net and you've all seen it before)