You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ma...@apache.org on 2006/03/06 23:08:33 UTC

svn commit: r383689 - /apr/apr-util/trunk/crypto/getuuid.c

Author: maxb
Date: Mon Mar  6 14:08:32 2006
New Revision: 383689

URL: http://svn.apache.org/viewcvs?rev=383689&view=rev
Log:
Fix broken UUID timestamp generation. Code was already present to convert a
unix timestamp to a DCE/RFC4122 UUID timestamp (which uses a different
granularity and epoch-start), but it was not being used.

* crypto/getuuid.c (get_current_time): Actually use get_system_time(), and
    use apr_uint64_t to handle time values throughout.

Modified:
    apr/apr-util/trunk/crypto/getuuid.c

Modified: apr/apr-util/trunk/crypto/getuuid.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/crypto/getuuid.c?rev=383689&r1=383688&r2=383689&view=diff
==============================================================================
--- apr/apr-util/trunk/crypto/getuuid.c (original)
+++ apr/apr-util/trunk/crypto/getuuid.c Mon Mar  6 14:08:32 2006
@@ -147,11 +147,11 @@
 {
     /* ### this needs to be made thread-safe! */
 
-    apr_time_t time_now;
-    static apr_interval_time_t time_last = 0;
-    static apr_interval_time_t fudge = 0;
+    apr_uint64_t time_now;
+    static apr_uint64_t time_last = 0;
+    static apr_uint64_t fudge = 0;
 
-    time_now = apr_time_now();
+    get_system_time(&time_now);
         
     /* if clock reading changed since last UUID generated... */
     if (time_last != time_now) {