summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-30 16:28:24 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-30 16:31:09 +0200
commitf1a716d8872fc912607a6b0fa97beb0b30ff44f2 (patch)
tree5219ab8319ade3c1ad9ea551ced13e22c9ed0c8f
parent715f3a5506d0bcb2713c194d8c0ac46ec7c09329 (diff)
downloadgnutls-f1a716d8872fc912607a6b0fa97beb0b30ff44f2.tar.gz
gnutls_handshake_set_timeout will properly work with DTLS
-rw-r--r--lib/gnutls_handshake.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index c3e14641ab..8a7b5a197e 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2616,6 +2616,11 @@ int gnutls_handshake(gnutls_session_t session)
void
gnutls_handshake_set_timeout(gnutls_session_t session, unsigned int ms)
{
+ if (IS_DTLS(session)) {
+ gnutls_dtls_set_timeouts(session, 1000, ms);
+ return;
+ }
+
if (ms == GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT)
ms = DEFAULT_HANDSHAKE_TIMEOUT_MS;
session->internals.handshake_timeout_ms = ms;