X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8800895ae8a1e9c49c739839a6623292d7a473d0..b2f5a03200c914f601bc9d28c6e069316a3b20eb:/src/src/acl.c diff --git a/src/src/acl.c b/src/src/acl.c index 06fa6e898..ef8f06da6 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.47 2005/09/12 10:08:54 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.50 2005/10/03 13:25:33 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1391,10 +1391,8 @@ occurred earlier. If not, we can attempt the verification now. */ if (strcmpic(ss, US"helo") == 0) { if (slash != NULL) goto NO_OPTIONS; - if (helo_verified) return OK; - if (helo_verify_failed) return FAIL; - if (smtp_verify_helo()) return helo_verified? OK : FAIL; - return DEFER; + if (!helo_verified && !helo_verify_failed) smtp_verify_helo(); + return helo_verified? OK : FAIL; } /* Do Client SMTP Authorization checks in a separate function, and turn the @@ -2164,16 +2162,16 @@ else + (double)tv.tv_usec / 1000000.0; double prev_time = (double)dbd->time_stamp + (double)dbd->time_usec / 1000000.0; - double interval = this_time - prev_time; - - double i_over_p = interval / period; - double a = exp(-i_over_p); /* We must avoid division by zero, and deal gracefully with the clock going backwards. If we blunder ahead when time is in reverse then the computed - rate will become bogusly huge. Clamp i/p to a very small number instead. */ + rate will be bogus. To be safe we clamp interval to a very small number. */ - if (i_over_p <= 0.0) i_over_p = 1e-9; + double interval = this_time - prev_time <= 0.0 ? 1e-9 + : this_time - prev_time; + + double i_over_p = interval / period; + double a = exp(-i_over_p); dbd->time_stamp = tv.tv_sec; dbd->time_usec = tv.tv_usec; @@ -2499,10 +2497,12 @@ for (; cb != NULL; cb = cb->next) submission_domain = string_copyn(p+8, pp-p-8); p = pp; } + /* The name= option must be last, because it swallows the rest of + the string. */ else if (Ustrncmp(p, "/name=", 6) == 0) { uschar *pp = p + 6; - while (*pp != 0 && *pp != '/') pp++; + while (*pp != 0) pp++; submission_name = string_copy(parse_fix_phrase(p+6, pp-p-6, big_buffer, big_buffer_size)); p = pp;