mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-10 09:33:48 +00:00
Fix nfc-poll card removing check (should be done only if a target has been found).
This commit is contained in:
@@ -145,15 +145,14 @@ main(int argc, const char *argv[])
|
|||||||
|
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
print_nfc_target(&nt, verbose);
|
print_nfc_target(&nt, verbose);
|
||||||
|
printf("Waiting for card removing...");
|
||||||
|
while (0 == nfc_initiator_target_is_present(pnd, NULL)) {}
|
||||||
|
nfc_perror(pnd, "nfc_initiator_target_is_present");
|
||||||
|
printf("done.\n");
|
||||||
} else {
|
} else {
|
||||||
printf("No target found.\n");
|
printf("No target found.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Waiting for card removing...");
|
|
||||||
while (0 == nfc_initiator_target_is_present(pnd, NULL)) {}
|
|
||||||
nfc_perror(pnd, "nfc_initiator_target_is_present");
|
|
||||||
printf("done.\n");
|
|
||||||
|
|
||||||
nfc_close(pnd);
|
nfc_close(pnd);
|
||||||
nfc_exit(context);
|
nfc_exit(context);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user