mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
openthread: fix wrong OpenThread uart read return value handling
This commit is contained in:
@@ -119,7 +119,7 @@ esp_err_t esp_openthread_uart_process()
|
|||||||
|
|
||||||
if (rval > 0) {
|
if (rval > 0) {
|
||||||
otPlatUartReceived(s_uart_buffer, (uint16_t)rval);
|
otPlatUartReceived(s_uart_buffer, (uint16_t)rval);
|
||||||
} else if (rval > 0) {
|
} else if (rval < 0) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
otLogWarnPlat("read uart failed: %d", errno);
|
otLogWarnPlat("read uart failed: %d", errno);
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
|
Reference in New Issue
Block a user