aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-25 16:29:54 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-25 16:29:54 +0300
commit29e20dfb656e146c8b2797a8d4b12cf6fa87fc92 (patch)
treec943ff0615fd6bff5be3fe7c594cf33901e1cc4c /src/microhttpd/daemon.c
parent6d210e7986375d208a75d3a7c82f799e34358645 (diff)
downloadlibmicrohttpd-29e20dfb656e146c8b2797a8d4b12cf6fa87fc92.tar.gz
libmicrohttpd-29e20dfb656e146c8b2797a8d4b12cf6fa87fc92.zip
Fixed cast of incompatible function pointer,
Default logger must return 'void', not 'int'
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 5c35373d..249e4f6f 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -218,6 +218,19 @@ MHD_check_global_init_ (void)
218} 218}
219#endif /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */ 219#endif /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */
220 220
221
222/**
223 * Default logger function
224 */
225static void
226MHD_default_logger_ (void *cls,
227 const char *fm,
228 va_list ap)
229{
230 vfprintf ((FILE*)cls, fm, ap);
231}
232
233
221/** 234/**
222 * Trace up to and return master daemon. If the supplied daemon 235 * Trace up to and return master daemon. If the supplied daemon
223 * is a master, then return the daemon itself. 236 * is a master, then return the daemon itself.
@@ -5664,7 +5677,7 @@ MHD_start_daemon_va (unsigned int flags,
5664 daemon->listen_backlog_size = 511; /* should be safe value */ 5677 daemon->listen_backlog_size = 511; /* should be safe value */
5665#endif /* !SOMAXCONN */ 5678#endif /* !SOMAXCONN */
5666#ifdef HAVE_MESSAGES 5679#ifdef HAVE_MESSAGES
5667 daemon->custom_error_log = (MHD_LogCallback) &vfprintf; 5680 daemon->custom_error_log = &MHD_default_logger_;
5668 daemon->custom_error_log_cls = stderr; 5681 daemon->custom_error_log_cls = stderr;
5669#endif 5682#endif
5670 if ( (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION)) && 5683 if ( (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION)) &&