summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2011-07-08 11:28:38 -0400
committerNick Pelly <npelly@google.com>2011-07-08 11:28:38 -0400
commita2f8fdd5067083aff0491ae24fbc954c71ada576 (patch)
treefe6000c273b677854d1393855bb18cb6459a56d8
parent3a9d18ff42ce17d62e1968ed93358d036989b670 (diff)
downloadexternal_libnfc-nxp-a2f8fdd5067083aff0491ae24fbc954c71ada576.zip
external_libnfc-nxp-a2f8fdd5067083aff0491ae24fbc954c71ada576.tar.gz
external_libnfc-nxp-a2f8fdd5067083aff0491ae24fbc954c71ada576.tar.bz2
Return partial response on timeout during uart read()
This is just to match the behavior in the old uart read DAL. It does not actually fix any problems, just pushes errors higher in stack. Change-Id: Iee065f39a006804be2618c3704e32b3f41a8a59e
-rw-r--r--Linux_x86/phDal4Nfc_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Linux_x86/phDal4Nfc_uart.c b/Linux_x86/phDal4Nfc_uart.c
index 7ab4021..6c3a00f 100644
--- a/Linux_x86/phDal4Nfc_uart.c
+++ b/Linux_x86/phDal4Nfc_uart.c
@@ -296,7 +296,7 @@ int phDal4Nfc_uart_read(uint8_t * pBuffer, int nNbBytesToRead)
return -1;
} else if (ret == 0) {
DAL_PRINT("timeout!");
- return -1;
+ break; // return partial response
}
ret = read(gComPortContext.nHandle, pBuffer + numRead, nNbBytesToRead - numRead);
if (ret > 0) {