gtls: only call gnutls_transport_set_lowat with <gnutls-2.12.0

The default lowat level for gnutls-2.12* is set to zero to avoid
unnecessary system calls and the gnutls_transport_set_lowat function has
been totally removed in >=gnutls-3 which causes build failures.

Therefore, the function shouldn't be used except for versions that
require it, <gnutls-2.12.0.
This commit is contained in:
Tim Harder 2011-10-19 10:08:56 +02:00 committed by Daniel Stenberg
parent 2621dd42a4
commit 8036da870c
1 changed files with 2 additions and 0 deletions

View File

@ -476,8 +476,10 @@ gtls_connect_step1(struct connectdata *conn,
gnutls_transport_set_push_function(session, Curl_gtls_push);
gnutls_transport_set_pull_function(session, Curl_gtls_pull);
#if GNUTLS_VERSION_NUMBER < 0x020c00
/* lowat must be set to zero when using custom push and pull functions. */
gnutls_transport_set_lowat(session, 0);
#endif
/* This might be a reconnect, so we check for a session ID in the cache
to speed up things */