[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r5312 - trunk/softHSM/src/lib

Rickard Bellgrim rickard at opendnssec.org
Mon Jul 11 10:06:52 CEST 2011


Author: rb
Date: 2011-07-11 10:06:52 +0200 (Mon, 11 Jul 2011)
New Revision: 5312

Modified:
   trunk/softHSM/src/lib/log.cpp
Log:
Fix logging


Modified: trunk/softHSM/src/lib/log.cpp
===================================================================
--- trunk/softHSM/src/lib/log.cpp	2011-07-11 07:05:29 UTC (rev 5311)
+++ trunk/softHSM/src/lib/log.cpp	2011-07-11 08:06:52 UTC (rev 5312)
@@ -39,6 +39,7 @@
 #include <syslog.h>
 #else
 #include <windows.h>
+#include <stdio.h>
 #endif
 
 void logError(const char *functionName, const char *text) {
@@ -49,7 +50,7 @@
   if(hEventLog) {
     char msg[1024];
     snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
-    ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, (LPCWSTR*)msg, NULL));
+    ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, (LPCSTR*)msg, NULL);
     CloseEventLog(hEventLog);
   }
 #endif
@@ -63,7 +64,7 @@
   if(hEventLog) {
     char msg[1024];
     snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
-    ReportEvent(hEventLog, EVENTLOG_WARNING_TYPE, 0, 0, NULL, 1, 0, (LPCWSTR*)msg, NULL));
+    ReportEvent(hEventLog, EVENTLOG_WARNING_TYPE, 0, 0, NULL, 1, 0, (LPCSTR*)msg, NULL);
     CloseEventLog(hEventLog);
   }
 #endif
@@ -77,7 +78,7 @@
   if(hEventLog) {
     char msg[1024];
     snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
-    ReportEvent(hEventLog, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (LPCWSTR*)msg, NULL));
+    ReportEvent(hEventLog, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (LPCSTR*)msg, NULL);
     CloseEventLog(hEventLog);
   }
 #endif




More information about the Opendnssec-commits mailing list