[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 17/154: mhd_send: start adding logic from s
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 17/154: mhd_send: start adding logic from send_param_adapter. |
Date: |
Mon, 19 Aug 2019 10:15:29 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libmicrohttpd.
commit 5e99e18f2db625fbe937f99a7f2916e2eee82008
Author: ng0 <address@hidden>
AuthorDate: Tue Jul 2 22:21:45 2019 +0000
mhd_send: start adding logic from send_param_adapter.
---
src/microhttpd/mhd_send.c | 11 +++++++++++
src/microhttpd/mhd_send.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 85616e52..2240ee0c 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -85,6 +85,17 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
const MHD_SCKT_OPT_BOOL_ off_val = 0;
const MHD_SCKT_OPT_BOOL_ on_val = 1;
+ // error handling from send_param_adapter()
+ if ( (MHD_INVALID_SOCKET == s) ||
+ (MHD_CONNECTION_CLOSED == connection->state) )
+ {
+ return MHD_ERR_NOTCONN_;
+ }
+
+ // from send_param_adapter()
+ if (buffer_size > MHD_SCKT_SEND_MAX_SIZE_)
+ buffer_size = MHD_SCKT_SEND_MAX_SIZE_; /* return value limit */
+
// new code...
/* Get socket options, change/set options if necessary. */
switch (options)
diff --git a/src/microhttpd/mhd_send.h b/src/microhttpd/mhd_send.h
index 11b9bce6..64b4f240 100644
--- a/src/microhttpd/mhd_send.h
+++ b/src/microhttpd/mhd_send.h
@@ -34,6 +34,7 @@
#endif /* HAVE_STDBOOL_H */
#include <errno.h>
#include "mhd_sockets.h"
+#include "connection.h"
enum MHD_SendSocketOptions
{
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [libmicrohttpd] 01/154: mhd_send: Add initial version., (continued)
- [GNUnet-SVN] [libmicrohttpd] 01/154: mhd_send: Add initial version., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 04/154: mhd_send: minor typo, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 02/154: mhd_send, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 03/154: mhd_send: fix switch., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 05/154: mhd_send: remove unnecessary comments., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 08/154: fix syntax, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 06/154: mhd_send: Move return_bytes related code into the right place., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 07/154: provide example for use of getsockopt to get MSS, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 09/154: startingpoint, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 14/154: mhd_send.c: Try to guess the right branch to close., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 17/154: mhd_send: start adding logic from send_param_adapter.,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 12/154: Add mhd_send to Makefile, more fixes in mhd_send., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 20/154: mhd_send.c: variable declarations (style)., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 19/154: adjust, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 11/154: restructure a bit to reuse existing send function, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 23/154: mhd_send: change send_tls_adapter() to non-static and export its prototype, use it in mhd_send.c, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 22/154: mhd_send.c: call send_tls_adapter() when TLS is used., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 24/154: move TLS branch to right position, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 37/154: flatten if statements, add initial TCP_NOPUSH to MHD_send_on_connection2_, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 39/154: indent, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 33/154: replace connection->send_cls(), gnunet, 2019/08/19