[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: mhd_send.c: do not use gnutls_rec
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: mhd_send.c: do not use gnutls_record_cork() and gnutls_record_uncork() if GnuTLS library doesn't have it |
Date: |
Tue, 27 Oct 2020 19:14:04 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 155ac53e mhd_send.c: do not use gnutls_record_cork() and
gnutls_record_uncork() if GnuTLS library doesn't have it
155ac53e is described below
commit 155ac53ed4221c4af0a00e85b90a6a10a32e4c75
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Oct 27 21:05:48 2020 +0300
mhd_send.c: do not use gnutls_record_cork() and
gnutls_record_uncork() if GnuTLS library doesn't have it
---
src/microhttpd/mhd_send.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 006525d2..6e362252 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -347,11 +347,13 @@ MHD_send_on_connection_ (struct MHD_Connection
*connection,
{
bool have_cork = connection->sk_cork_on;
+#if GNUTLS_VERSION_NUMBER >= 0x030109
if (want_cork && ! have_cork)
{
gnutls_record_cork (connection->tls_session);
connection->sk_cork_on = true;
}
+#endif /* GNUTLS_VERSION_NUMBER >= 0x030109 */
if (buffer_size > SSIZE_MAX)
buffer_size = SSIZE_MAX;
ret = gnutls_record_send (connection->tls_session,
@@ -378,6 +380,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
* connections may break data into smaller parts for sending. */
#endif /* EPOLL_SUPPORT */
+#if GNUTLS_VERSION_NUMBER >= 0x030109
if (! want_cork && have_cork)
{
int err = gnutls_record_uncork (connection->tls_session, 0);
@@ -386,6 +389,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
return MHD_ERR_AGAIN_;
connection->sk_cork_on = false;
}
+#endif /* GNUTLS_VERSION_NUMBER >= 0x030109 */
}
else
#endif /* HTTPS_SUPPORT */
@@ -469,6 +473,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
header,
header_size,
MHD_SSO_HDR_CORK);
+#if GNUTLS_VERSION_NUMBER >= 0x030109
if ( (header_size == (size_t) ret) &&
(0 == buffer_size) &&
connection->sk_cork_on)
@@ -480,6 +485,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
return ret;
connection->sk_cork_on = false;
}
+#endif /* GNUTLS_VERSION_NUMBER >= 0x030109 */
return ret;
}
#endif
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: mhd_send.c: do not use gnutls_record_cork() and gnutls_record_uncork() if GnuTLS library doesn't have it,
gnunet <=