[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Check should (indeed
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Check should (indeed) be for GNUTLS_E_AGAIN. |
Date: |
Wed, 19 Dec 2018 00:07:33 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new b7052c04 Check should (indeed) be for GNUTLS_E_AGAIN.
b7052c04 is described below
commit b7052c04159e2d04482328f518dafc27e358cc65
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 19 00:06:48 2018 +0100
Check should (indeed) be for GNUTLS_E_AGAIN.
Lasa Martxel wrote:
Hello,
I have found the following code in daemon.c file, lines 1449 to 1467:
if (0 >= res)
{
if (GNUTLS_E_INTERRUPTED != res)
{
urh->app.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
if (GNUTLS_E_INTERRUPTED != res)
(GNUTLS_E_INTERRUPTED != res) is checked twice.
In the read part (a few lines above), GNUTLS_E_INTERRUPTED != res is
checked first and then GNUTLS_E_AGAIN != res. It looks like something similar
should be done here, but I’m not sure.
Thanks,
Martxel
---
ChangeLog | 4 ++++
src/include/microhttpd.h | 2 +-
src/microhttpd/daemon.c | 16 ++++++++--------
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7a895911..1227571f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 19 00:06:03 CET 2018
+ Check for GNUTLS_E_AGAIN instead of GNUTLS_E_INTERRUPTED when
+ giving up on a TLS connection. -LM/CG
+
Thu Dec 13 22:48:14 CET 2018
Fix connection timeout logic if in thread-per-connection mode the
working thread takes longer than the timeout to queue the response. -CG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index dba9a4ca..f654d1d7 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00096202
+#define MHD_VERSION 0x00096203
/**
* MHD-internal return code for "YES".
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index ea12a532..4fc5b1b6 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1451,7 +1451,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
if (GNUTLS_E_INTERRUPTED != res)
{
urh->app.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
- if (GNUTLS_E_INTERRUPTED != res)
+ if (GNUTLS_E_AGAIN != res)
{
/* TLS connection shut down or
* persistent / unrecoverable error. */
@@ -2740,7 +2740,7 @@ internal_suspend_connection_ (struct MHD_Connection
*connection)
connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED;
}
#endif
-#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
+#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
#endif
}
@@ -2949,7 +2949,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
}
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
-#endif
+#endif
if ( (used_thr_p_c) &&
(MHD_NO != ret) )
{ /* Wake up suspended connections. */
@@ -3121,7 +3121,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
}
else
{
-#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
+#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
#endif
daemon->at_limit = true;
@@ -4640,7 +4640,7 @@ unescape_wrapper (void *cls,
char *val)
{
(void) cls; /* Mute compiler warning. */
-
+
(void) connection; /* Mute compiler warning. */
return MHD_http_unescape (val);
}
@@ -4731,7 +4731,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon)
#endif
return MHD_INVALID_SOCKET;
}
-
+
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
if (NULL != daemon->worker_pool)
for (i = 0; i < daemon->worker_pool_size; i++)
@@ -6091,7 +6091,7 @@ MHD_start_daemon_va (unsigned int flags,
MHD_socket_last_strerr_());
#endif
if (0 != (*pflags & MHD_USE_EPOLL)
-#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
+#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
|| (daemon->worker_pool_size > 0)
#endif
)
@@ -6555,7 +6555,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
unsigned int i;
#endif
-
+
if (NULL == daemon)
return;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Check should (indeed) be for GNUTLS_E_AGAIN.,
gnunet <=