aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-07-02 22:21:45 +0000
committerng0 <ng0@n0.is>2019-07-02 22:21:45 +0000
commit5e99e18f2db625fbe937f99a7f2916e2eee82008 (patch)
tree1d26e12bdbf3b0f1c7c198d7d33a78c9e74da3dc
parent09ef9de1ca62bb47fe7cb320fc595275911f6a14 (diff)
downloadlibmicrohttpd-5e99e18f2db625fbe937f99a7f2916e2eee82008.tar.gz
libmicrohttpd-5e99e18f2db625fbe937f99a7f2916e2eee82008.zip
mhd_send: start adding logic from send_param_adapter.
-rw-r--r--src/microhttpd/mhd_send.c11
-rw-r--r--src/microhttpd/mhd_send.h1
2 files changed, 12 insertions, 0 deletions
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,
85 const MHD_SCKT_OPT_BOOL_ off_val = 0; 85 const MHD_SCKT_OPT_BOOL_ off_val = 0;
86 const MHD_SCKT_OPT_BOOL_ on_val = 1; 86 const MHD_SCKT_OPT_BOOL_ on_val = 1;
87 87
88 // error handling from send_param_adapter()
89 if ( (MHD_INVALID_SOCKET == s) ||
90 (MHD_CONNECTION_CLOSED == connection->state) )
91 {
92 return MHD_ERR_NOTCONN_;
93 }
94
95 // from send_param_adapter()
96 if (buffer_size > MHD_SCKT_SEND_MAX_SIZE_)
97 buffer_size = MHD_SCKT_SEND_MAX_SIZE_; /* return value limit */
98
88 // new code... 99 // new code...
89 /* Get socket options, change/set options if necessary. */ 100 /* Get socket options, change/set options if necessary. */
90 switch (options) 101 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 @@
34#endif /* HAVE_STDBOOL_H */ 34#endif /* HAVE_STDBOOL_H */
35#include <errno.h> 35#include <errno.h>
36#include "mhd_sockets.h" 36#include "mhd_sockets.h"
37#include "connection.h"
37 38
38enum MHD_SendSocketOptions 39enum MHD_SendSocketOptions
39{ 40{