nfc_target_send_bytes() function returns now sent bytes count on success and libnfc error code on failure.

This commit is contained in:
Audrey Diacre 2011-12-22 15:59:08 +00:00
parent ac6f652368
commit 9c1371dcca
11 changed files with 51 additions and 50 deletions

View file

@ -425,7 +425,7 @@ main (int argc, char *argv[])
}
if (!initiator_only_mode) {
// Transmit the response bytes
if (!nfc_target_send_bytes(pndTarget, abtRapdu, szRapduLen, 0)) {
if (nfc_target_send_bytes(pndTarget, abtRapdu, szRapduLen, 0) < 0) {
nfc_perror (pndTarget, "nfc_target_send_bytes");
if (!target_only_mode) {
nfc_disconnect (pndInitiator);