gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/06: Upgraded TLS: fixed inefficient communication


From: gnunet
Subject: [libmicrohttpd] 03/06: Upgraded TLS: fixed inefficient communication
Date: Fri, 31 Mar 2023 09:22:49 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 6b5e509ff088d05c1033c6773169d8d001991b95
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Mar 30 18:09:36 2023 +0200

    Upgraded TLS: fixed inefficient communication
---
 src/microhttpd/response.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index f0ca7825..fc006da2 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -2045,13 +2045,26 @@ MHD_response_execute_upgrade_ (struct MHD_Response 
*response,
       free (urh);
       return MHD_NO;
     }
+    pool = connection->pool;
+    if (0 != connection->write_buffer_size)
+    {
+      mhd_assert (NULL != connection->write_buffer);
+      /* All data should be sent already */
+      mhd_assert (connection->write_buffer_send_offset == \
+                  connection->write_buffer_append_offset);
+      (void) MHD_pool_reallocate (pool, connection->write_buffer,
+                                  connection->write_buffer_size, 0);
+      connection->write_buffer_append_offset = 0;
+      connection->write_buffer_send_offset = 0;
+      connection->write_buffer_size = 0;
+    }
+    connection->write_buffer = NULL;
     urh->app.socket = sv[0];
     urh->app.urh = urh;
     urh->app.celi = MHD_EPOLL_STATE_UNREADY;
     urh->mhd.socket = sv[1];
     urh->mhd.urh = urh;
     urh->mhd.celi = MHD_EPOLL_STATE_UNREADY;
-    pool = connection->pool;
     avail = MHD_pool_get_free (pool);
     if (avail < RESERVE_EBUF_SIZE)
     {

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