diff options
author | ng0 <ng0@n0.is> | 2019-08-02 11:31:30 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-08-02 11:31:30 +0000 |
commit | 8b1e8793379015ae3ef32e02234467c6e539b448 (patch) | |
tree | d3de04a701d7c0bce60d24a12e6013d601a77940 | |
parent | 818b0a791b3e48cce9da91a1aa136ce2b65e8aaf (diff) | |
download | libmicrohttpd-8b1e8793379015ae3ef32e02234467c6e539b448.tar.gz libmicrohttpd-8b1e8793379015ae3ef32e02234467c6e539b448.zip |
fix a couple of fixmes: add log messages.
-rw-r--r-- | src/microhttpd/mhd_send.c | 28 |
1 files 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, | |||
81 | /* FIXME: optlen invalid, should at least log this, maybe die */ | 81 | /* FIXME: optlen invalid, should at least log this, maybe die */ |
82 | break; | 82 | break; |
83 | case EFAULT: | 83 | case EFAULT: |
84 | /* FIXME: wopsie, should at leats log this, maybe die */ | 84 | /* wopsie, should at leats log this, FIXME: maybe die */ |
85 | #ifdef HAVE_MESSAGES | ||
86 | MHD_DLOG (daemon, | ||
87 | _("The addresss pointed to by optval is not a valid part of the process address space: %s\n"), | ||
88 | MHD_socket_last_strerr_()); | ||
89 | #endif | ||
85 | break; | 90 | break; |
86 | case ENOPROTOOPT: | 91 | case ENOPROTOOPT: |
87 | /* FIXME: optlen unknown, should at least log this */ | 92 | /* optlen unknown, should at least log this */ |
93 | #ifdef HAVE_MESSAGES | ||
94 | MHD_DLOG (daemon, | ||
95 | _("The option is unknown: %s\n"), | ||
96 | MHD_socket_last_strerr_()); | ||
97 | #endif | ||
88 | break; | 98 | break; |
89 | default: | 99 | default: |
90 | /* any others? man page does not list more... */ | 100 | /* any others? man page does not list more... */ |
@@ -152,10 +162,20 @@ post_cork_setsockopt (struct MHD_Connection *connection, | |||
152 | /* FIXME: optlen invalid, should at least log this, maybe die */ | 162 | /* FIXME: optlen invalid, should at least log this, maybe die */ |
153 | break; | 163 | break; |
154 | case EFAULT: | 164 | case EFAULT: |
155 | /* FIXME: wopsie, should at leats log this, maybe die */ | 165 | /* wopsie, should at leats log this, FIXME: maybe die */ |
166 | #ifdef HAVE_MESSAGES | ||
167 | MHD_DLOG (daemon, | ||
168 | _("The addresss pointed to by optval is not a valid part of the process address space: %s\n"), | ||
169 | MHD_socket_last_strerr_()); | ||
170 | #endif | ||
156 | break; | 171 | break; |
157 | case ENOPROTOOPT: | 172 | case ENOPROTOOPT: |
158 | /* FIXME: optlen unknown, should at least log this */ | 173 | /* optlen unknown, should at least log this */ |
174 | #ifdef HAVE_MESSAGES | ||
175 | MHD_DLOG (daemon, | ||
176 | _("The option is unknown: %s\n"), | ||
177 | MHD_socket_last_strerr_()); | ||
178 | #endif | ||
159 | break; | 179 | break; |
160 | default: | 180 | default: |
161 | /* any others? man page does not list more... */ | 181 | /* any others? man page does not list more... */ |