Browse Source

mhd_send.c: log EINVAL

ng0 6 years ago
parent
commit
b8e368272a
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/microhttpd/mhd_send.c

+ 10 - 0
src/microhttpd/mhd_send.c

@@ -79,6 +79,11 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
       break;
     case EINVAL:
       /* FIXME: optlen invalid, should at least log this, maybe die */
+#ifdef HAVE_MESSAGES
+      MHD_DLOG (daemon,
+                _("optlen invalid: %s\n"),
+                MHD_socket_last_strerr_());
+#endif
       break;
     case EFAULT:
       /* wopsie, should at leats log this, FIXME: maybe die */
@@ -160,6 +165,11 @@ post_cork_setsockopt (struct MHD_Connection *connection,
       break;
     case EINVAL:
       /* FIXME: optlen invalid, should at least log this, maybe die */
+#ifdef HAVE_MESSAGES
+      MHD_DLOG (daemon,
+                _("optlen invalid: %s\n"),
+                MHD_socket_last_strerr_());
+#endif
       break;
     case EFAULT:
       /* wopsie, should at leats log this, FIXME: maybe die */