HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] ag: jobID/seqf
Am 2005.11.23 14:22 schrieb(en) Iseli, Erich:
In faxd/ModemServer.c++ I found one of the reference to FAX_SEQF. It
reads as follows:
u_long seqnum = Sequence::getNext(FAX_LOGDIR "/" FAX_SEQF, emsg);
[...]
C/C++ u_long 4 bytes 0 to 4294967295
Hello Moritz and Erich,
the data type is not the only limit.
Function Sequence::getNext is part of the HylaFAX source code.
In util/Sequence.c++ you can see the real limit MAXSEQNUM
which is defined as 999999999 in config.h[.in]
If I understand the code correct, the highest possible value is
MAXSEQNUM-1. When the file contains this value, function getNext will
set the new value to 0 with NEXTSEQNUM, which is defined as (((x)+1) %
MAXSEQNUM). The next call to getNext will change this 0 to 1 and print
a warning.
In order to avoid this warning and to allow MAXSEQNUM as maximum value
the macro could be changed to
#define NEXTSEQNUM(x) (((x) % MAXSEQNUM) + 1)
Bodo
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*