gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 294/335: stream_process_request: fixed reporting for ABO


From: gnunet
Subject: [libmicrohttpd] 294/335: stream_process_request: fixed reporting for ABORT actions
Date: Sat, 27 Jul 2024 22:03:10 +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 a963e3c281c48ec5644a7fff0c9d44545091ac5c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jul 22 22:03:02 2024 +0200

    stream_process_request: fixed reporting for ABORT actions
---
 src/mhd2/stream_process_request.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/mhd2/stream_process_request.c 
b/src/mhd2/stream_process_request.c
index dabef10f..0cf953e9 100644
--- a/src/mhd2/stream_process_request.c
+++ b/src/mhd2/stream_process_request.c
@@ -2914,8 +2914,9 @@ mhd_stream_call_app_request_cb (struct MHD_Connection 
*restrict c)
                      (enum MHD_HTTP_Method) c->rq.http_mthd,
                      c->rq.cntn.cntn_size);
 
-  if (((NULL != a) && (&(c->rq.app_act.head_act) != a)) ||
-      ! mhd_ACTION_IS_VALID (c->rq.app_act.head_act.act))
+  if ((NULL != a)
+      && (((&(c->rq.app_act.head_act) != a))
+          || ! mhd_ACTION_IS_VALID (c->rq.app_act.head_act.act)))
   {
     mhd_LOG_MSG (d, MHD_SC_ACTION_INVALID, \
                  "Provided action is not a correct action generated " \
@@ -2978,15 +2979,18 @@ process_upload_action (struct MHD_Connection *restrict 
c,
                        const struct MHD_UploadAction *act,
                        bool final)
 {
-  if (((NULL != act) && (&(c->rq.app_act.upl_act) != act)) ||
-      ! mhd_UPLOAD_ACTION_IS_VALID (c->rq.app_act.upl_act.act) ||
-      (final &&
-       (mhd_UPLOAD_ACTION_CONTINUE == c->rq.app_act.upl_act.act)))
+  if (NULL != act)
   {
-    mhd_LOG_MSG (c->daemon, MHD_SC_UPLOAD_ACTION_INVALID, \
-                 "Provided action is not a correct action generated " \
-                 "for the current request.");
-    act = NULL;
+    if ((&(c->rq.app_act.upl_act) != act) ||
+        ! mhd_UPLOAD_ACTION_IS_VALID (c->rq.app_act.upl_act.act) ||
+        (final &&
+         (mhd_UPLOAD_ACTION_CONTINUE == c->rq.app_act.upl_act.act)))
+    {
+      mhd_LOG_MSG (c->daemon, MHD_SC_UPLOAD_ACTION_INVALID, \
+                   "Provided action is not a correct action generated " \
+                   "for the current request.");
+      act = NULL;
+    }
   }
   if (NULL == act)
     c->rq.app_act.upl_act.act = mhd_UPLOAD_ACTION_ABORT;

-- 
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]