nfc_target_send_bytes() function returns now sent bytes count on success and libnfc error code on failure.
This commit is contained in:
parent
ac6f652368
commit
9c1371dcca
11 changed files with 51 additions and 50 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ nfc_target_emulate_tag(nfc_device *pnd, nfc_target *pnt)
|
|||
while ( loop ) {
|
||||
loop = target_io( pnt, abtRx, szRx, abtTx, &szTx );
|
||||
if (szTx) {
|
||||
if (!nfc_target_send_bytes(pnd, abtTx, szTx, 0)) {
|
||||
if (nfc_target_send_bytes(pnd, abtTx, szTx, 0) < 0) {
|
||||
nfc_perror (pnd, "nfc_target_send_bytes");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue