diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-28 10:31:50 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-28 13:42:40 +0200 |
commit | 8d095429ea6f01a6db84df8d896a0f7bb5b0bba1 (patch) | |
tree | ae6de0e0f165250186aad2eb9e08dcb87b740a9b /lib/dtls.c | |
parent | cfe068979d11ef99362cb3b2354556c275911a1b (diff) | |
download | gnutls-8d095429ea6f01a6db84df8d896a0f7bb5b0bba1.tar.gz |
instead of assigning a variable per flag use the init flags directly
That is store the flags provided in gnutls_init() in the session structure
and use these flags directly when required.
Diffstat (limited to 'lib/dtls.c')
-rw-r--r-- | lib/dtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dtls.c b/lib/dtls.c index 6ae3056910..ece8c66291 100644 --- a/lib/dtls.c +++ b/lib/dtls.c @@ -241,7 +241,7 @@ int _dtls_transmit(gnutls_session_t session) * return. */ if (session->internals.dtls.flight_init != 0 - && session->internals.blocking == 0) { + && (session->internals.flags & GNUTLS_NONBLOCK)) { /* just in case previous run was interrupted */ ret = _gnutls_io_write_flush(session); if (ret < 0) { @@ -360,7 +360,7 @@ int _dtls_transmit(gnutls_session_t session) goto cleanup; } else { /* all other messages -> implicit ack (receive of next flight) */ - if (session->internals.blocking != 0) + if (!(session->internals.flags & GNUTLS_NONBLOCK)) ret = _gnutls_io_check_recv(session, timeout); @@ -427,7 +427,7 @@ int _dtls_wait_and_retransmit(gnutls_session_t session) { int ret; - if (session->internals.blocking != 0) + if (!(session->internals.flags & GNUTLS_NONBLOCK)) ret = _gnutls_io_check_recv(session, TIMER_WINDOW); else ret = _gnutls_io_check_recv(session, 0); |