aboutsummaryrefslogtreecommitdiffstats
path: root/ucs2-afb/ucs_binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'ucs2-afb/ucs_binding.c')
-rw-r--r--ucs2-afb/ucs_binding.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ucs2-afb/ucs_binding.c b/ucs2-afb/ucs_binding.c
index 1819407..ba49e20 100644
--- a/ucs2-afb/ucs_binding.c
+++ b/ucs2-afb/ucs_binding.c
@@ -154,7 +154,6 @@ PUBLIC void UCSI_CB_SendMostMessage(void *pTag, const uint8_t *pData, uint32_t l
CdevData_t *cdevTx = &ucsContext->tx;
uint32_t total = 0;
-
if (NULL == pData || 0 == len) return;
if (O_RDONLY == cdevTx->fileFlags) return;
@@ -167,13 +166,11 @@ PUBLIC void UCSI_CB_SendMostMessage(void *pTag, const uint8_t *pData, uint32_t l
ssize_t written = write(cdevTx->fileHandle, &pData[total], (len - total));
if (0 >= written)
{
- cdevTx->fileHandle = -1;
- return;
+ /* Silently ignore write error (only occur in non-blocking mode) */
+ break;
}
total += (uint32_t) written;
}
-
- return;
}
/**