summaryrefslogtreecommitdiff
path: root/lib/buffers.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-10-12 13:52:03 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-10-12 14:56:17 +0200
commit8d43daf7b5f75952a7d5ec49f1138db18ebe8ddb (patch)
tree7e5797d1dbca3e064236eec3810ea9d76b69cc48 /lib/buffers.c
parentc141b08728e0853633c8cd3dc35d108984d47f9c (diff)
downloadgnutls-8d43daf7b5f75952a7d5ec49f1138db18ebe8ddb.tar.gz
Introduced GNUTLS_INDEFINITE_TIMEOUT
This allows to specify an indefinite timeout to gnutls_record_set_timeout(). In addition this flag is accepted by gnutls_handshake_set_timeout() and cancels out a previously set timeout. Resolves #41
Diffstat (limited to 'lib/buffers.c')
-rw-r--r--lib/buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/buffers.c b/lib/buffers.c
index cc340710ff..e43a0c4b5d 100644
--- a/lib/buffers.c
+++ b/lib/buffers.c
@@ -380,7 +380,7 @@ _gnutls_stream_read(gnutls_session_t session, mbuffer_st ** bufel,
left -= i;
(*bufel)->msg.size += i;
- if (ms && *ms > 0) {
+ if (ms && *ms > 0 && *ms != GNUTLS_INDEFINITE_TIMEOUT) {
gettime(&t2);
diff = timespec_sub_ms(&t2, &t1);
if (diff < *ms)