From 93b44ac1bfc2849dd539e07ded4ae7a81c315a50 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 10 May 2016 11:12:33 +0200 Subject: reset the global time func on init/deinit --- lib/system.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/system.c b/lib/system.c index 731d734db4..9cc6344175 100644 --- a/lib/system.c +++ b/lib/system.c @@ -317,7 +317,7 @@ static int gnutls_system_mutex_unlock(void **priv) #endif /* NO_LOCKS */ -gnutls_time_func gnutls_time = time; +gnutls_time_func gnutls_time; mutex_init_func gnutls_mutex_init = gnutls_system_mutex_init; mutex_deinit_func gnutls_mutex_deinit = gnutls_system_mutex_deinit; mutex_lock_func gnutls_mutex_lock = gnutls_system_mutex_lock; @@ -344,6 +344,7 @@ int gnutls_system_global_init(void) Crypt32_dll = crypto; #endif #endif + gnutls_time = time; return 0; } @@ -354,6 +355,7 @@ void gnutls_system_global_deinit(void) FreeLibrary(Crypt32_dll); #endif #endif + gnutls_time = time; } -- cgit v1.2.1