commit 8b1e8793379015ae3ef32e02234467c6e539b448
parent 818b0a791b3e48cce9da91a1aa136ce2b65e8aaf
Author: ng0 <ng0@n0.is>
Date: Fri, 2 Aug 2019 11:31:30 +0000
fix a couple of fixmes: add log messages.
Diffstat:
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git 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... */