]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Backed out change to update_time to handle time
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 9 Nov 2005 21:13:57 +0000 (21:13 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 9 Nov 2005 21:13:57 +0000 (21:13 +0000)
backtracks.  Will reimplement as a more comprehensive
patch.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@790 e7ae566f-a301-0410-adde-c780ea21d3b5

otime.c
otime.h

diff --git a/otime.c b/otime.c
index 14a52af0c0322ddeebe26fa45c7102850834bb83..ad9cbbfea2085e45a98da766593efe7c29c3fb29 100644 (file)
--- a/otime.c
+++ b/otime.c
@@ -35,7 +35,6 @@
 #include "memdbg.h"
 
 volatile time_t now; /* GLOBAL */
-unsigned int now_adj = 0; /* GLOBAL */
 
 /* 
  * Return a numerical string describing a struct timeval.
diff --git a/otime.h b/otime.h
index 09a85c74ad87cdb551d72e825b825c83ea87e277..974d0afe07b21b76f48b45f220946335209dede8 100644 (file)
--- a/otime.h
+++ b/otime.h
@@ -55,16 +55,13 @@ const char *tv_string (const struct timeval *tv, struct gc_arena *gc);
 const char *tv_string_abs (const struct timeval *tv, struct gc_arena *gc);
 
 extern volatile time_t now; /* updated frequently to time(NULL) */
-extern unsigned int now_adj;
 
 static inline void
 update_time (void)
 {
-  const time_t real_time = time (NULL) + now_adj;
-  if (real_time > now)
+  const time_t real_time = time (NULL);
+  if (real_time != now)
     now = real_time;
-  else if (real_time < now)
-    now_adj += (now - real_time);
 }
 
 static inline void