Merge pull request #306 from Mincka/master

Fix nfc-poll card removing check
This commit is contained in:
Romuald Conty 2015-08-03 17:43:54 +02:00
commit c55bbec50d

View file

@ -145,14 +145,13 @@ main(int argc, const char *argv[])
if (res > 0) { if (res > 0) {
print_nfc_target(&nt, verbose); print_nfc_target(&nt, verbose);
} else {
printf("No target found.\n");
}
printf("Waiting for card removing..."); printf("Waiting for card removing...");
while (0 == nfc_initiator_target_is_present(pnd, NULL)) {} while (0 == nfc_initiator_target_is_present(pnd, NULL)) {}
nfc_perror(pnd, "nfc_initiator_target_is_present"); nfc_perror(pnd, "nfc_initiator_target_is_present");
printf("done.\n"); printf("done.\n");
} else {
printf("No target found.\n");
}
nfc_close(pnd); nfc_close(pnd);
nfc_exit(context); nfc_exit(context);