[net.bugs.uucp] sequence number bug

ka@spanky.UUCP (06/24/83)

Uucp uses the routine getseq in the file gename.c to calculate four
digit sequence numbers for spool files.  When the sequence number
reaches 10000, it will occupy five digits in the file name which
will cause uucico to misinterprtet the system name.  The next se-
quence number after 10000 will be 1001 because when getseq reads
the old sequence number from the seqfile it only reads the first
four digits.

The solution is to compute the sequence number modulo 10.  Change
line 74 (approximately) from:

	sprintf(snum, "%.4d", ++n);

to

	n = (n + 1) % 10000;
	sprintf(snum, "%.4d", n);