]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix some problems with the time commit. I guess mod_unique_id isn't turned
authorRyan Bloom <rbb@apache.org>
Thu, 8 Jun 2000 01:47:21 +0000 (01:47 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 8 Jun 2000 01:47:21 +0000 (01:47 +0000)
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

modules/metadata/mod_unique_id.c

index fb6fa019e57cd69b6e1f7f026e8935f89475124d..7430dfd85cc57f1953cff29c108c69f4be138cf3 100644 (file)
@@ -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;
 
     /*