Emmanuel Dreyfus wrote:
>That means that in pending.c:pending_check(), we don't match the
>if (rest < 0) condition.
>
>rest is time_t. that is signed on my system, is it on yours?
Yes, it's signed on my system, so that shouldn't be a problem.
I guess that would result in more severe problems anyway (no
messages accepted at all, as rest will never be < 0).
I've taken a closer look on pending_check(), and maybe I've found
something. After rest is computed as "accepted - now", it's checked
to be < 0. If that's true, it puts the message in the whitelist, and
sets rest=0. Later (goto out), a check for rest==0 decides whether
1 or 0 is returned, which again determines if the message is accepted
or not.
Now if "accepted - now" is exactly 0, it will fail the first check for
<0, so the message will not be whitelisted. Later it's checked for
==0, and the message is accepted.
Could that be the problem ? And if so, would a viable fix be to
change "if (rest < 0) {" to "if (rest <= 0) {" in pending_check()
(line 305) ?
mp.
--
Martin Paul | Systems Administrator
Institute of Scientific Computing | martin@...
Nordbergstrasse 15/C/3, A-1090 Wien | Tel: 01 4277 39403
http://www.par.univie.ac.at/ | Fax: 01 4277 9394Message
Re: race condition ?
2005-04-11 by Martin Paul
Attachments
- No local attachments were found for this message.