[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated (b2b8492d -> 2a0c96ff)
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated (b2b8492d -> 2a0c96ff) |
Date: |
Sat, 17 Apr 2021 17:53:05 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a change to branch master
in repository libmicrohttpd.
from b2b8492d memorypool: muted compiler warning and additional assert
new c1b8333a mhd_send: changed results for non-IP sockets
new 2a0c96ff response: simplified code
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/microhttpd/mhd_send.c | 4 ++--
src/microhttpd/response.c | 27 +++++++--------------------
2 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index c1696619..a1c50917 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -176,7 +176,7 @@ MHD_connection_set_nodelay_state_ (struct MHD_Connection
*connection,
int err_code;
if (_MHD_YES == connection->is_nonip)
- return true;
+ return false;
if (0 == setsockopt (connection->socket_fd,
IPPROTO_TCP,
@@ -246,7 +246,7 @@ MHD_connection_set_cork_state_ (struct MHD_Connection
*connection,
int err_code;
if (_MHD_YES == connection->is_nonip)
- return true;
+ return false;
if (0 == setsockopt (connection->socket_fd,
IPPROTO_TCP,
MHD_TCP_CORK_NOPUSH,
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index c4b6c1e0..5dcdca18 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -42,6 +42,7 @@
#include "mhd_str.h"
#include "connection.h"
#include "memorypool.h"
+#include "mhd_send.h"
#include "mhd_compat.h"
@@ -1042,27 +1043,13 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle
*urh,
MHD_resume_connection (connection);
return MHD_YES;
case MHD_UPGRADE_ACTION_CORK_ON:
- if (_MHD_ON == connection->sk_corked)
- return MHD_YES;
- if (0 !=
- MHD_socket_cork_ (connection->socket_fd,
- true))
- {
- connection->sk_corked = _MHD_ON;
- return MHD_YES;
- }
- return MHD_NO;
+ /* Unportable API. TODO: replace with portable action. */
+ return MHD_connection_set_cork_state_ (connection,
+ true) ? MHD_YES : MHD_NO;
case MHD_UPGRADE_ACTION_CORK_OFF:
- if (_MHD_OFF == connection->sk_corked)
- return MHD_YES;
- if (0 !=
- MHD_socket_cork_ (connection->socket_fd,
- false))
- {
- connection->sk_corked = _MHD_OFF;
- return MHD_YES;
- }
- return MHD_NO;
+ /* Unportable API. TODO: replace with portable action. */
+ return MHD_connection_set_cork_state_ (connection,
+ false) ? MHD_YES : MHD_NO;
default:
/* we don't understand this one */
return MHD_NO;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (b2b8492d -> 2a0c96ff),
gnunet <=