Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

sequence numbers don't wrap around correctly




Hylafax 4.0 on netbsd 1.1

Job numbers for outgoing faxes increase sequentially from 1 to 31999
but then instead of starting again at 0, the next number is 1999 and
then 200009 after which things settle down again.


The evidence of my own eyes:

$ echo test | sendfax -d phil@4955232
request id is 31999 (group id 31999) for host downstage (1 file)

$ echo test | sendfax -d phil@4955232
request id is 1999 (group id 1999) for host downstage (1 file)

$ echo test | sendfax -d phil@4955232
request id is 20009 (group id 20009) for host downstage (1 file)


I don't have a patch for this yet, but I believe the problem is in
HylaFAXServer::getSequenceNumber which writes the sequence number to
the file as %u, overwriting the text that's already there.

so the sequence goes

31999
01999  (incremented 31999 to 32000, wrapped to 0 and wrote "0" at offset 0)
20009  (incremented 01999 to 02000, wrote it at offset 0)

And so on.

Come to think of it, the easiest patch for this is to change the "%u"
to a "%5.5u".  Does anybody out there have a setup where this is
easier to change rebuild & test than I do, or do I gotta do it?

        -phil



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services