[Pcsclite-cvs-commit] r3450 - /trunk/PCSC/src/utils.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Apr 14 14:49:02 UTC 2009
Author: rousseau
Date: Tue Apr 14 14:49:02 2009
New Revision: 3450
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3450
Log:
StatSynchronize(): remove event fifo files only if they are 60 seconds old.
The normal case is for the client to remove its one event file after
use. The daemon sould only remove files from dead clients.
Modified:
trunk/PCSC/src/utils.c
Modified: trunk/PCSC/src/utils.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/utils.c?rev=3450&op=diff
==============================================================================
--- trunk/PCSC/src/utils.c (original)
+++ trunk/PCSC/src/utils.c Tue Apr 14 14:49:02 2009
@@ -141,7 +141,8 @@
(void)SYS_CloseFile(fd);
}
- if (unlink(filename))
+ /* remove files older than 60 seconds */
+ if ((difftime(time(NULL), fstat_buf.st_atime) > 60) && unlink(filename))
Log3(PCSC_LOG_ERROR, "Can't remove %s: %s", filename,
strerror(errno));
}
More information about the Pcsclite-cvs-commit
mailing list