mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
mhd_send: start adding logic from send_param_adapter.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#endif /* HAVE_STDBOOL_H */
|
||||
#include <errno.h>
|
||||
#include "mhd_sockets.h"
|
||||
#include "connection.h"
|
||||
|
||||
enum MHD_SendSocketOptions
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user