activated ATR polling as workaround for pyscard bug #3084449. now when the real smartcard is removed, the relay process terminates

git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@318 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-10-11 12:31:13 +00:00
parent aca3559290
commit 425e054916
2 changed files with 22 additions and 7 deletions

View File

@@ -189,9 +189,13 @@ int vicc_transmit(int apdu_len, const char *apdu, char **rapdu) {
}
int vicc_present(void) {
if (client_sock > 0)
if (client_sock > 0) {
char *atr = NULL;
if (vicc_getatr(&atr) < 0)
return 0;
free(atr);
return 1;
else {
} else {
/* Wait up to one microsecond. */
client_sock = waitforclient(server_sock, 0, 1);
if (client_sock < 0)