[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 272/335: Fixes
From: |
gnunet |
Subject: |
[libmicrohttpd] 272/335: Fixes |
Date: |
Sat, 27 Jul 2024 22:02:48 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.
commit 16a9214c1ffea6825984387a1dbac4fdeeb83003
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jul 22 13:46:40 2024 +0200
Fixes
---
src/mhd2/daemon_start.c | 2 +-
src/mhd2/stream_funcs.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mhd2/daemon_start.c b/src/mhd2/daemon_start.c
index f211fe9c..e2a28c69 100644
--- a/src/mhd2/daemon_start.c
+++ b/src/mhd2/daemon_start.c
@@ -1069,7 +1069,7 @@ init_epoll (struct MHD_Daemon *restrict d)
mhd_assert ((mhd_POLL_TYPE_EPOLL != d->events.poll_type) || \
(MHD_INVALID_SOCKET == d->events.data.epoll.e_fd));
#ifdef HAVE_EPOLL_CREATE1
- e_fd = epoll_create1 (EFD_CLOEXEC);
+ e_fd = epoll_create1 (FD_CLOEXEC);
#else /* ! HAVE_EPOLL_CREATE1 */
e_fd = epoll_create (128); /* The number is usually ignored */
if (0 <= e_fd)
diff --git a/src/mhd2/stream_funcs.c b/src/mhd2/stream_funcs.c
index d9aca6ce..3abb71f3 100644
--- a/src/mhd2/stream_funcs.c
+++ b/src/mhd2/stream_funcs.c
@@ -701,7 +701,9 @@ mhd_conn_pre_close (struct MHD_Connection *restrict c,
break;
case mhd_SOCKET_ERR_REMT_DISCONN:
close_hard = false;
- term_code = MHD_REQUEST_TERMINATED_CLIENT_ABORT;
+ term_code = (MHD_CONNECTION_INIT == c->state) ?
+ MHD_REQUEST_TERMINATED_COMPLETED_OK /* Not used */ :
+ MHD_REQUEST_TERMINATED_CLIENT_ABORT;
break;
case mhd_SOCKET_ERR_CONNRESET:
term_code = MHD_REQUEST_TERMINATED_CLIENT_ABORT;
@@ -799,6 +801,7 @@ mhd_conn_pre_close (struct MHD_Connection *restrict c,
#endif /* ! HAVE_LOG_FUNCTIONALITY */
#if 0 // TODO: notification callback
+ mhd_assert ((MHD_CONNECTION_INIT != c->state) || (! c->rq.app_aware));
if ( (NULL != d->notify_completed) &&
(c->rq.app_aware) )
d->notify_completed (d->notify_completed_cls,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 255/335: clean up example, (continued)
- [libmicrohttpd] 255/335: clean up example, gnunet, 2024/07/27
- [libmicrohttpd] 256/335: minimal_example2: saved two extra calls of MHD_daemon_destroy(), gnunet, 2024/07/27
- [libmicrohttpd] 274/335: daemon_start.c: make sure that sys symbols defined, gnunet, 2024/07/27
- [libmicrohttpd] 276/335: Workaround for Linux kernel bug, gnunet, 2024/07/27
- [libmicrohttpd] 267/335: epoll and other fixes, gnunet, 2024/07/27
- [libmicrohttpd] 249/335: fix FTBFS issues, gnunet, 2024/07/27
- [libmicrohttpd] 270/335: -fix test setup logic, gnunet, 2024/07/27
- [libmicrohttpd] 258/335: fix copy and paste bug, gnunet, 2024/07/27
- [libmicrohttpd] 271/335: Make sure that connection is closed if disconnected remotely, gnunet, 2024/07/27
- [libmicrohttpd] 265/335: add test with chunked upload, gnunet, 2024/07/27
- [libmicrohttpd] 272/335: Fixes,
gnunet <=
- [libmicrohttpd] 277/335: More workarounds for Linux kernel, gnunet, 2024/07/27
- [libmicrohttpd] 268/335: Proper conn cleanup on daemon close, no wait if something is already ready, gnunet, 2024/07/27
- [libmicrohttpd] 259/335: Fixed shutdown of the daemon, gnunet, 2024/07/27
- [libmicrohttpd] 281/335: Moved client-server tests to dedicated dir, gnunet, 2024/07/27
- [libmicrohttpd] 279/335: Fixed assert, gnunet, 2024/07/27
- [libmicrohttpd] 283/335: More missing parts for moved test, gnunet, 2024/07/27
- [libmicrohttpd] 287/335: Temporal workaround to avoid settings regeneration, gnunet, 2024/07/27
- [libmicrohttpd] 273/335: minimal_example2: flush output, gnunet, 2024/07/27
- [libmicrohttpd] 284/335: test_client_server: use proper macros, gnunet, 2024/07/27
- [libmicrohttpd] 275/335: .gitignore: updated, gnunet, 2024/07/27