dtls: check both DTLS_CTRL_GET_TIMEOUT and DTLS_CTRL_HANDLE_TIMEOUT

This commit is contained in:
Alfred E. Heggestad 2011-12-22 13:41:34 +00:00
parent 315a459deb
commit d78551bf75

View file

@ -117,7 +117,7 @@ static struct bio_method_st bio_udp_send = {
};
#ifdef DTLS_CTRL_HANDLE_TIMEOUT
#if defined (DTLS_CTRL_HANDLE_TIMEOUT) && defined(DTLS_CTRL_GET_TIMEOUT)
static void timeout(void *arg)
{
struct tls_conn *tc = arg;
@ -130,7 +130,7 @@ static void timeout(void *arg)
static void check_timer(struct tls_conn *tc)
{
#ifdef DTLS_CTRL_GET_TIMEOUT
#if defined (DTLS_CTRL_HANDLE_TIMEOUT) && defined (DTLS_CTRL_GET_TIMEOUT)
struct timeval tv = {0, 0};
if (DTLSv1_get_timeout(tc->ssl, &tv)) {