+ // boolean not to do openlog several times
+ static int syslog_opened = 0;
- if ((LogSuppress != DEBUGLOG_LOG_ENTRIES)
- || (priority < LogLevel) /* log priority lower than threshold? */
+ if ((priority < LogLevel) /* log priority lower than threshold? */
+ || (DEBUGLOG_NO_DEBUG == LogMsgType))
@@ -114,13 +116,18 @@
- vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
+ vsnprintf(DebugBuffer, sizeof DebugBuffer, fmt, argptr);
va_end(argptr);
+ if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType && !syslog_opened) {
+ syslog(LOG_DEBUG, "%s", DebugBuffer);
else
{
- if (LogDoColor)
+ static struct timeval last_time = { 0, 0 };
+++ pcsc-lite-1.5.2/src/winscard.c 2009-04-02 22:54:43.137718835 +0200
@@ -430,6 +430,12 @@
{
- (void)SYS_MutexUnLock(rContext->mMutex);
+ (void)pthread_mutex_unlock(rContext->mMutex);
+ /*
+ * If it is set to ANY let it do any of the protocols
+ dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
+
if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
- return SCARD_E_PROTO_MISMATCH;
- }
+ {
+ rv = SCARD_E_PROTO_MISMATCH;
@@ -758,6 +764,12 @@
{
- (void)SYS_MutexUnLock(rContext->mMutex);
+ (void)pthread_mutex_unlock(rContext->mMutex);
+ /*
+ * If it is set to ANY let it do any of the protocols
+ dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
+
if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
- return SCARD_E_PROTO_MISMATCH;
- }
+ {
+ rv = SCARD_E_PROTO_MISMATCH;