gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 06/15: Renamed one more connection state for clarity


From: gnunet
Subject: [libmicrohttpd] 06/15: Renamed one more connection state for clarity
Date: Fri, 28 Oct 2022 11:21:55 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit dd7f9dfe91f01cd56db0d64fe01b05eecae6ee3a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Oct 21 09:30:09 2022 +0300

    Renamed one more connection state for clarity
---
 src/microhttpd/connection.c | 14 +++++++-------
 src/microhttpd/internal.c   |  6 ++++--
 src/microhttpd/internal.h   |  4 ++--
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index da2cd248..9589a2d8 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2554,7 +2554,7 @@ MHD_connection_update_event_loop_info (struct 
MHD_Connection *connection)
     case MHD_CONNECTION_CONTINUE_SENDING:
       connection->event_loop_info = MHD_EVENT_LOOP_INFO_WRITE;
       break;
-    case MHD_CONNECTION_CONTINUE_SENT:
+    case MHD_CONNECTION_BODY_RECEIVING:
       if (connection->read_buffer_offset == connection->read_buffer_size)
       {
         const bool internal_poll = (0 != (connection->daemon->options
@@ -4173,7 +4173,7 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection,
   case MHD_CONNECTION_HEADERS_RECEIVED:
   case MHD_CONNECTION_HEADERS_PROCESSED:
   case MHD_CONNECTION_CONTINUE_SENDING:
-  case MHD_CONNECTION_CONTINUE_SENT:
+  case MHD_CONNECTION_BODY_RECEIVING:
   case MHD_CONNECTION_BODY_RECEIVED:
   case MHD_CONNECTION_FOOTER_PART_RECEIVED:
   case MHD_CONNECTION_FOOTERS_RECEIVED:
@@ -4297,7 +4297,7 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
     connection->continue_message_write_offset += (size_t) ret;
     MHD_update_last_activity_ (connection);
     return;
-  case MHD_CONNECTION_CONTINUE_SENT:
+  case MHD_CONNECTION_BODY_RECEIVING:
   case MHD_CONNECTION_BODY_RECEIVED:
   case MHD_CONNECTION_FOOTER_PART_RECEIVED:
   case MHD_CONNECTION_FOOTERS_RECEIVED:
@@ -4941,7 +4941,7 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
       }
       connection->state = (0 == connection->rq.remaining_upload_size)
                           ? MHD_CONNECTION_FULL_REQ_RECEIVED
-                          : MHD_CONNECTION_CONTINUE_SENT;
+                          : MHD_CONNECTION_BODY_RECEIVING;
       if (connection->suspended)
         break;
       continue;
@@ -4949,17 +4949,17 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
       if (connection->continue_message_write_offset ==
           MHD_STATICSTR_LEN_ (HTTP_100_CONTINUE))
       {
-        connection->state = MHD_CONNECTION_CONTINUE_SENT;
+        connection->state = MHD_CONNECTION_BODY_RECEIVING;
         continue;
       }
       break;
-    case MHD_CONNECTION_CONTINUE_SENT:
+    case MHD_CONNECTION_BODY_RECEIVING:
       if (0 != connection->read_buffer_offset)
       {
         process_request_body (connection);           /* loop call */
         if (connection->discard_request)
         {
-          mhd_assert (MHD_CONNECTION_CONTINUE_SENT != connection->state);
+          mhd_assert (MHD_CONNECTION_BODY_RECEIVING != connection->state);
           continue;
         }
       }
diff --git a/src/microhttpd/internal.c b/src/microhttpd/internal.c
index dee21e9e..6f80b984 100644
--- a/src/microhttpd/internal.c
+++ b/src/microhttpd/internal.c
@@ -1,6 +1,7 @@
 /*
      This file is part of libmicrohttpd
      Copyright (C) 2007 Daniel Pittman and Christian Grothoff
+     Copyright (C) 2015-2021 Evgeny Grin (Karlson2k)
 
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Lesser General Public
@@ -22,6 +23,7 @@
  * @brief  internal shared structures
  * @author Daniel Pittman
  * @author Christian Grothoff
+ * @author Karlson2k (Evgeny Grin)
  */
 
 #include "internal.h"
@@ -51,8 +53,8 @@ MHD_state_to_string (enum MHD_CONNECTION_STATE state)
     return "headers processed";
   case MHD_CONNECTION_CONTINUE_SENDING:
     return "continue sending";
-  case MHD_CONNECTION_CONTINUE_SENT:
-    return "continue sent";
+  case MHD_CONNECTION_BODY_RECEIVING:
+    return "body receiving";
   case MHD_CONNECTION_BODY_RECEIVED:
     return "body received";
   case MHD_CONNECTION_FOOTER_PART_RECEIVED:
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 1565c21f..990552b7 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -649,12 +649,12 @@ enum MHD_CONNECTION_STATE
   /**
    * We have sent 100 CONTINUE (or do not need to).  Read the message body.
    */
-  MHD_CONNECTION_CONTINUE_SENT = MHD_CONNECTION_CONTINUE_SENDING + 1,
+  MHD_CONNECTION_BODY_RECEIVING = MHD_CONNECTION_CONTINUE_SENDING + 1,
 
   /**
    * We got the request body.  Wait for a line of the footer.
    */
-  MHD_CONNECTION_BODY_RECEIVED = MHD_CONNECTION_CONTINUE_SENT + 1,
+  MHD_CONNECTION_BODY_RECEIVED = MHD_CONNECTION_BODY_RECEIVING + 1,
 
   /**
    * We got part of a line of the footer.  Wait for the

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