gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]