mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 18:13:46 +00:00
check result of nfc_initiator_init() function in examples/ and utils/
This commit is contained in:
@@ -128,7 +128,10 @@ main (int argc, const char *argv[])
|
||||
nfc_target nt;
|
||||
|
||||
// Set connected NFC device to initiator mode
|
||||
nfc_initiator_init (pnd);
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Let the reader only try once to find a tag
|
||||
if (nfc_device_set_property_bool (pnd, NP_INFINITE_SELECT, false) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user