From 8b1e8793379015ae3ef32e02234467c6e539b448 Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 2 Aug 2019 11:31:30 +0000 Subject: fix a couple of fixmes: add log messages. --- src/microhttpd/mhd_send.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 0b1ae127..928e92cb 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c @@ -81,10 +81,20 @@ pre_cork_setsockopt (struct MHD_Connection *connection, /* FIXME: optlen invalid, should at least log this, maybe die */ break; case EFAULT: - /* FIXME: wopsie, should at leats log this, maybe die */ + /* wopsie, should at leats log this, FIXME: maybe die */ +#ifdef HAVE_MESSAGES + MHD_DLOG (daemon, + _("The addresss pointed to by optval is not a valid part of the process address space: %s\n"), + MHD_socket_last_strerr_()); +#endif break; case ENOPROTOOPT: - /* FIXME: optlen unknown, should at least log this */ + /* optlen unknown, should at least log this */ +#ifdef HAVE_MESSAGES + MHD_DLOG (daemon, + _("The option is unknown: %s\n"), + MHD_socket_last_strerr_()); +#endif break; default: /* any others? man page does not list more... */ @@ -152,10 +162,20 @@ post_cork_setsockopt (struct MHD_Connection *connection, /* FIXME: optlen invalid, should at least log this, maybe die */ break; case EFAULT: - /* FIXME: wopsie, should at leats log this, maybe die */ + /* wopsie, should at leats log this, FIXME: maybe die */ +#ifdef HAVE_MESSAGES + MHD_DLOG (daemon, + _("The addresss pointed to by optval is not a valid part of the process address space: %s\n"), + MHD_socket_last_strerr_()); +#endif break; case ENOPROTOOPT: - /* FIXME: optlen unknown, should at least log this */ + /* optlen unknown, should at least log this */ +#ifdef HAVE_MESSAGES + MHD_DLOG (daemon, + _("The option is unknown: %s\n"), + MHD_socket_last_strerr_()); +#endif break; default: /* any others? man page does not list more... */ -- cgit v1.2.3