summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-08-15 16:44:13 +0300
committerAlon Levy <alevy@redhat.com>2010-08-15 16:45:06 +0300
commitc2cc49a5578f415d3ddd5a5a81c2e8771a015c4c (patch)
tree6076c34a1201b4debe3126186c31559f76c49aeb
parentc34b4421653815c54e66dbd5dc9ac7239c3aa614 (diff)
fix virtual card remove
-rw-r--r--vcard_emul_nss.c4
-rw-r--r--vscard_common.h (renamed from scard_common.h)0
2 files changed, 2 insertions, 2 deletions
diff --git a/vcard_emul_nss.c b/vcard_emul_nss.c
index 48ca0e4..fee56dc 100644
--- a/vcard_emul_nss.c
+++ b/vcard_emul_nss.c
@@ -585,7 +585,7 @@ vcard_emul_get_password(PK11SlotInfo *slot, PRBool retries, void *pw_arg)
VCardEmulError
vcard_emul_force_card_remove(VReader *vreader)
{
- if (!vreader_card_is_present(vreader)) {
+ if (vreader_card_is_present(vreader) != VREADER_OK) {
return VCARD_EMUL_FAIL; /* card is already removed */
}
@@ -601,7 +601,7 @@ vcard_emul_force_card_insert(VReader *vreader)
VReaderEmul *vreader_emul = vreader_get_private(vreader);
VCard *vcard;
- if (vreader_card_is_present(vreader)) {
+ if (vreader_card_is_present(vreader) == VREADER_OK) {
return VCARD_EMUL_FAIL; /* card is already inserted */
}
diff --git a/scard_common.h b/vscard_common.h
index 7e90a58..7e90a58 100644
--- a/scard_common.h
+++ b/vscard_common.h