[Pcsclite-cvs-commit] r3286 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Jan 20 15:14:25 UTC 2009
Author: rousseau
Date: Tue Jan 20 15:14:24 2009
New Revision: 3286
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3286
Log:
WaitForPcscdEvent(): use hContext instead of a random to name the event
file
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3286&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Jan 20 15:14:24 2009
@@ -1710,7 +1710,7 @@
return rv;
}
-static long WaitForPcscdEvent(long dwTime)
+static long WaitForPcscdEvent(SCARDCONTEXT hContext, long dwTime)
{
char filename[FILENAME_MAX];
char buf[1];
@@ -1729,8 +1729,8 @@
ptv = &tv;
}
- (void)snprintf(filename, sizeof(filename), "%s/event.%d.%d",
- PCSCLITE_EVENTS_DIR, SYS_GetPID(), SYS_RandomInt(0, 0x10000));
+ (void)snprintf(filename, sizeof(filename), "%s/event.%d.%ld",
+ PCSCLITE_EVENTS_DIR, SYS_GetPID(), hContext);
(void)mkfifo(filename, 0644);
fd = SYS_OpenFile(filename, O_RDONLY | O_NONBLOCK, 0);
@@ -1939,7 +1939,7 @@
goto end;
}
- dwTime = WaitForPcscdEvent(dwTime);
+ dwTime = WaitForPcscdEvent(hContext, dwTime);
if (dwTimeout != INFINITE)
{
if (dwTime <= 0)
@@ -2242,7 +2242,7 @@
break;
/* Only sleep once for each cycle of reader checks. */
- dwTime = WaitForPcscdEvent(dwTime);
+ dwTime = WaitForPcscdEvent(hContext, dwTime);
if (dwTimeout != INFINITE)
{
More information about the Pcsclite-cvs-commit
mailing list