previous coding assumed this would not happen, and under PIPELINING
would result in both lost and duplicate recipients for a message.
previous coding assumed this would not happen, and under PIPELINING
would result in both lost and duplicate recipients for a message.
+JH/43 Bug 2694: Fix weighted distribution of work to multiple spamd servers.
+ Previously the weighting was incorrectly applied. Found and fixed by
+ Heiko Schlichting.
{
sd = spamds[i];
if (!sd->is_failed && sd->priority == pri)
{
sd = spamds[i];
if (!sd->is_failed && sd->priority == pri)
- if ((rnd -= sd->weight) <= 0)
+ if ((rnd -= sd->weight) < 0)