From 46cfe6199449a86eb58abaeac45b4021ffa7e178 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 17 Aug 2003 12:04:35 +0000 Subject: [PATCH] Do what the SDK documentation tells. --- src/logger.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/logger.c b/src/logger.c index 52a5bb2..02f3f0f 100644 --- a/src/logger.c +++ b/src/logger.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: logger.c,v 1.1.2.10 2003/08/17 09:04:00 guus Exp $ + $Id: logger.c,v 1.1.2.11 2003/08/17 12:04:35 guus Exp $ */ #include "system.h" @@ -51,7 +51,7 @@ void openlogger(const char *ident, logmode_t mode) { break; case LOGMODE_SYSLOG: #ifdef HAVE_MINGW - loghandle = OpenEventLog(NULL, identname); + loghandle = RegisterEventSource(NULL, logident); if(!loghandle) logmode = LOGMODE_NULL; break; @@ -87,8 +87,9 @@ void logger(int priority, const char *format, ...) { #ifdef HAVE_MINGW { char message[4096]; + char *messages[] = {message}; vsnprintf(message, sizeof(message), format, ap); - ReportEvent(loghandle, priority, 0, 0, NULL, 1, 0, &message, NULL); + ReportEvent(loghandle, priority, 0, 0, NULL, 1, 0, messages, NULL); } #else #ifdef HAVE_SYSLOG_H @@ -118,7 +119,7 @@ void closelogger(void) { break; case LOGMODE_SYSLOG: #ifdef HAVE_MINGW - CloseEventLog(loghandle); + DeregisterEventSource(loghandle); break; #else #ifdef HAVE_SYSLOG_H -- 2.25.1