[Pcsclite-cvs-commit] r2953 - /trunk/PCSC/src/winscard_svc.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu May 15 07:55:48 UTC 2008
Author: rousseau
Date: Thu May 15 07:55:48 2008
New Revision: 2953
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2953
Log:
CreateContextThread(): update to the new SYS_ThreadCreate() API
Modified:
trunk/PCSC/src/winscard_svc.c
Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=2953&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Thu May 15 07:55:48 2008
@@ -77,6 +77,7 @@
LONG CreateContextThread(uint32_t *pdwClientID)
{
int i;
+ int rv;
for (i = 0; i < PCSCLITE_MAX_APPLICATIONS_CONTEXTS; i++)
{
@@ -95,13 +96,13 @@
return SCARD_F_INTERNAL_ERROR;
}
- if (SYS_ThreadCreate(&psContext[i].pthThread, THREAD_ATTR_DETACHED,
- (PCSCLITE_THREAD_FUNCTION( )) ContextThread,
- (LPVOID) i) != 1)
+ rv = SYS_ThreadCreate(&psContext[i].pthThread, THREAD_ATTR_DETACHED,
+ (PCSCLITE_THREAD_FUNCTION( )) ContextThread, (LPVOID) i);
+ if (rv)
{
SYS_CloseFile(psContext[i].dwClientID);
psContext[i].dwClientID = 0;
- Log1(PCSC_LOG_CRITICAL, "SYS_ThreadCreate failed");
+ Log2(PCSC_LOG_CRITICAL, "SYS_ThreadCreate failed: %s", strerror(rv));
return SCARD_E_NO_MEMORY;
}
More information about the Pcsclite-cvs-commit
mailing list