From: Ryan Bloom Date: Thu, 8 Jun 2000 01:47:21 +0000 (+0000) Subject: Fix some problems with the time commit. I guess mod_unique_id isn't turned X-Git-Tag: APACHE_2_0_ALPHA_5~411 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=074aa6aec7449a7bb88be96d042c6befda8ea3ec;p=thirdparty%2Fapache%2Fhttpd.git Fix some problems with the time commit. I guess mod_unique_id isn't turned on by default, which is why my last build's didn't catch this. I'll be more careful in the future. Submitted by: Greg Stein git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85464 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index fb6fa019e57..7430dfd85cc 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -231,13 +231,13 @@ static void unique_id_global_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptem * next second. */ tv = ap_now(); - ap_sleep( + ap_sleep(tv); } static void unique_id_child_init(ap_pool_t *p, server_rec *s) { pid_t pid; - time_t tv; + ap_time_t tv; /* * Note that we use the pid because it's possible that on the same @@ -270,6 +270,9 @@ static void unique_id_child_init(ap_pool_t *p, server_rec *s) * going backwards in time. */ tv = ap_now(); + /* Some systems have very low variance on the low end of their system + * counter, defend against that. + */ cur_unique_id.counter = tv % APR_USEC_PER_SEC / 10; /*