Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site spanky.UUCP
Path: utzoo!linus!philabs!seismo!harpo!floyd!vax135!ariel!hou5f!orion!houca!hogpc!houxm!hocda!spanky!ka
From: ka@spanky.UUCP
Newsgroups: net.bugs.uucp
Subject: sequence number bug
Message-ID: <399@spanky.UUCP>
Date: Fri, 24-Jun-83 10:17:15 EDT
Article-I.D.: spanky.399
Posted: Fri Jun 24 10:17:15 1983
Date-Received: Sat, 25-Jun-83 20:46:21 EDT
Organization: Bell Labs, Holmdel, N. J.
Lines: 17

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);