gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed cast of incomp


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed cast of incompatible function pointer, Default logger must return 'void', not 'int'
Date: Sat, 25 May 2019 15:30:54 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 29e20dfb Fixed cast of incompatible function pointer, Default logger 
must return 'void', not 'int'
29e20dfb is described below

commit 29e20dfb656e146c8b2797a8d4b12cf6fa87fc92
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sat May 25 16:29:54 2019 +0300

    Fixed cast of incompatible function pointer,
    Default logger must return 'void', not 'int'
---
 src/microhttpd/daemon.c   | 15 ++++++++++++++-
 src/microhttpd/internal.h |  2 +-
 2 files changed, 15 insertions(+), 2 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)
 }
 #endif /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */
 
+
+/**
+ * Default logger function
+ */
+static void
+MHD_default_logger_ (void *cls,
+                     const char *fm,
+                     va_list ap)
+{
+  vfprintf ((FILE*)cls, fm, ap);
+}
+
+
 /**
  * Trace up to and return master daemon. If the supplied daemon
  * is a master, then return the daemon itself.
@@ -5664,7 +5677,7 @@ MHD_start_daemon_va (unsigned int flags,
   daemon->listen_backlog_size = 511; /* should be safe value */
 #endif /* !SOMAXCONN */
 #ifdef HAVE_MESSAGES
-  daemon->custom_error_log = (MHD_LogCallback) &vfprintf;
+  daemon->custom_error_log = &MHD_default_logger_;
   daemon->custom_error_log_cls = stderr;
 #endif
   if ( (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION)) &&
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 062cff13..97ac050f 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1422,7 +1422,7 @@ struct MHD_Daemon
    * Function for logging error messages (if we
    * support error reporting).
    */
-  void (*custom_error_log) (void *cls, const char *fmt, va_list va);
+  MHD_LogCallback custom_error_log;
 
   /**
    * Closure argument to @e custom_error_log.

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]