Hylafax Mailing List Archives

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

Re: [hylafax-users] ag: jobID/seqf



Am 2005.11.23 16:34 schrieb(en) Aidan Van Dyk:

Would the following patch make people happy?  I haven't tested this
well yet, but it's intended behaviour is:

1) Allow MAXSEQNUM (999999999) be used as a sequence value
2) Print a warning when we "overshoot" it, and reset it to 1
3) Remove a call to 64-bit mod
4) Never have 0 in the seqf file

Hello Aidan,


sure it's an improvement, but IMHO this is only a theroretical problem. It will be hard to measure faster processing or shorter CPU time with the removed mod operation and the maximum number 999999999 instead of 999999998 is only cosmetic.

My HylaFAX server probably will never wrap around, so I won't see these messages in my logfiles.

A possible enhancement is a "wrapping" warning message instead of the
current "Invalid sequence number..." warning message.

The intention of the original message looks seems to be to inform about invalid content in the sequence file. (The check could be improved by using strtol instead of atoi and checking the end-pointer.)


I think two separate warning messages would be better.

Maybe something like this:


if (seqnum < 1 || seqnum > MAXSEQNUM) {
if(seqnum == MAXSEQNUM+1) {
logWarning("%s: Maximum sequence number reached, starting with 1 again",
name);
} else {
logWarning("%s: Invalid sequence number \"%s\", resetting to 1"
name, line);
}
}




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*



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