diff options
author | Nick Pelly <npelly@google.com> | 2011-07-08 11:28:38 -0400 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-07-08 11:28:38 -0400 |
commit | a2f8fdd5067083aff0491ae24fbc954c71ada576 (patch) | |
tree | fe6000c273b677854d1393855bb18cb6459a56d8 /Linux_x86 | |
parent | 3a9d18ff42ce17d62e1968ed93358d036989b670 (diff) | |
download | external_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
Diffstat (limited to 'Linux_x86')
-rw-r--r-- | Linux_x86/phDal4Nfc_uart.c | 2 |
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) { |