Merge branch 'bugfix/openthread-uart-error' into 'master'

openthread: fix wrong OpenThread uart read return value handling

See merge request espressif/esp-idf!13909
pull/6904/head
Shu Chen 2021-06-08 13:53:08 +00:00
commit 43278fda3e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;