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

@ -133,7 +133,7 @@ main (int argc, const char *argv[])
printf ("Received: %s\n", abtRx);
printf ("Sending: %s\n", abtTx);
if (!nfc_target_send_bytes (pnd, abtTx, sizeof(abtTx), 0)) {
if (nfc_target_send_bytes (pnd, abtTx, sizeof(abtTx), 0) < 0) {
nfc_perror(pnd, "nfc_target_send_bytes");
goto error;
}