From a2f8fdd5067083aff0491ae24fbc954c71ada576 Mon Sep 17 00:00:00 2001 From: Nick Pelly Date: Fri, 8 Jul 2011 11:28:38 -0400 Subject: 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 --- Linux_x86/phDal4Nfc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Linux_x86') 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) { -- cgit v1.1