nfc-poll: disconnect from device if error in order to prevent from keep up RF field which have side effects: its power-consumming, device can became warm and it generates useless radiofrequencies.

This commit is contained in:
Romuald Conty 2010-09-22 12:48:40 +00:00
parent 0e37a1e9e9
commit bd547418e9

View file

@ -137,10 +137,10 @@ main (int argc, const char *argv[])
}; };
} }
} else { } else {
nfc_disconnect (pnd);
nfc_perror (pnd, "nfc_initiator_poll_targets"); nfc_perror (pnd, "nfc_initiator_poll_targets");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
nfc_disconnect (pnd); nfc_disconnect (pnd);
} }