libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit c51869af5a5f1b76cce745afaf9c75ac9a502ee0
parent b8e368272a4416aaf078525a4043a6f87a98bfee
Author: ng0 <ng0@n0.is>
Date:   Sun, 18 Aug 2019 11:19:40 +0000

mhd_send.c: for now, let EINVAL and EBADF fail hard.

Diffstat:
Msrc/microhttpd/mhd_send.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -76,6 +76,7 @@ pre_cork_setsockopt (struct MHD_Connection *connection, break; case EBADF: /* FIXME: should we die hard here? */ + return MHD_ERR_BADF_; /* Fail hard */ break; case EINVAL: /* FIXME: optlen invalid, should at least log this, maybe die */ @@ -84,6 +85,7 @@ pre_cork_setsockopt (struct MHD_Connection *connection, _("optlen invalid: %s\n"), MHD_socket_last_strerr_()); #endif + return MHD_ERR_INVAL_; /* Fail hard */ break; case EFAULT: /* wopsie, should at leats log this, FIXME: maybe die */ @@ -162,6 +164,7 @@ post_cork_setsockopt (struct MHD_Connection *connection, break; case EBADF: /* FIXME: should we die hard here? */ + return MHD_ERR_BADF_; /* Fail hard */ break; case EINVAL: /* FIXME: optlen invalid, should at least log this, maybe die */ @@ -170,6 +173,7 @@ post_cork_setsockopt (struct MHD_Connection *connection, _("optlen invalid: %s\n"), MHD_socket_last_strerr_()); #endif + return MHD_ERR_INVAL_; /* Fail hard */ break; case EFAULT: /* wopsie, should at leats log this, FIXME: maybe die */