summaryrefslogtreecommitdiff
path: root/lib/libssl/d1_lib.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-20 14:14:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-20 14:14:53 +0000
commit2437cb38b481bc7c553119dc3a5d4f1d0e9bd391 (patch)
treead98e29d1c3223be552d4aac2f6c9d0f6d515def /lib/libssl/d1_lib.c
parent46e725eb9a70408b255bc2f562f9be6cec1d49da (diff)
gettimeofday() is portable enough and does not need a wrapper
Diffstat (limited to 'lib/libssl/d1_lib.c')
-rw-r--r--lib/libssl/d1_lib.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c
index 1dc0efc29ca..b6b765634da 100644
--- a/lib/libssl/d1_lib.c
+++ b/lib/libssl/d1_lib.c
@@ -66,7 +66,6 @@
#include <openssl/objects.h>
#include "ssl_locl.h"
-static void get_current_time(struct timeval *t);
const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT;
int dtls1_listen(SSL *s, struct sockaddr *client);
@@ -307,7 +306,7 @@ dtls1_start_timer(SSL *s)
}
/* Set timeout to current time */
- get_current_time(&(s->d1->next_timeout));
+ gettimeofday(&(s->d1->next_timeout), NULL);
/* Add duration to current time */
s->d1->next_timeout.tv_sec += s->d1->timeout_duration;
@@ -324,7 +323,7 @@ dtls1_get_timeout(SSL *s, struct timeval* timeleft) {
}
/* Get current time */
- get_current_time(&timenow);
+ gettimeofday(&timenow, NULL);
/* If timer already expired, set remaining time to 0 */
if (s->d1->next_timeout.tv_sec < timenow.tv_sec ||
@@ -437,12 +436,6 @@ dtls1_handle_timeout(SSL *s)
return dtls1_retransmit_buffered_messages(s);
}
-static void
-get_current_time(struct timeval *t)
-{
- gettimeofday(t, NULL);
-}
-
int
dtls1_listen(SSL *s, struct sockaddr *client)
{