1 --- pcsc-lite-1.6.6/src/debuglog.c~ 2010-06-30 15:40:58.000000000 +0300
2 +++ pcsc-lite-1.6.6/src/debuglog.c 2011-01-12 01:58:18.693291099 +0200
5 char DebugBuffer[DEBUG_BUF_SIZE];
7 + // boolean not to do openlog several times
8 + static int syslog_opened = 0;
10 if ((LogSuppress != DEBUGLOG_LOG_ENTRIES)
11 || (priority < LogLevel) /* log priority lower than threshold? */
13 vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
16 + if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType && !syslog_opened) {
17 + openlog(NULL, LOG_PID, LOG_DAEMON);
21 log_line(priority, DebugBuffer);
24 static void log_line(const int priority, const char *DebugBuffer)
26 if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType)
27 - syslog(LOG_INFO, "%s", DebugBuffer);
28 + syslog(LOG_DEBUG, "%s", DebugBuffer);