From 1bccaccbd1a58d2ac9a510f3549a290ff6c28c95 Mon Sep 17 00:00:00 2001 From: Sebastien Sikora Date: Tue, 30 Nov 2021 17:18:42 +0000 Subject: [PATCH] Tidied comments. --- src/satterm_component.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/satterm_component.cpp b/src/satterm_component.cpp index 909c908..e11b5f7 100644 --- a/src/satterm_component.cpp +++ b/src/satterm_component.cpp @@ -210,7 +210,7 @@ std::string SatTerm_Component::GetMessage(size_t rx_fifo_index, bool capture_end } else if (status < 0) { // read() indicates an error. switch (errno) { // See under errors here - https://pubs.opengroup.org/onlinepubs/009604599/functions/read.html case EAGAIN: // Non-blocking read on empty fifo with connected writer will return -1 with error EAGAIN, - finished = ((time(0) - start_time) > timeout_seconds); // so we continue to poll. + finished = ((time(0) - start_time) > timeout_seconds); // so we continue to poll unless timeout. if (finished && (timeout_seconds > 0)) { m_error_code = {-1, "GetMessage()_tx_conn_timeout"}; } @@ -278,7 +278,7 @@ size_t SatTerm_Component::SendBytes(const char* bytes, size_t byte_count, size_t bytes_remaining -= (size_t)(status); } else { switch (errno) { - case EAGAIN: + case EAGAIN: // Erro - thread would block (buffer full, etc). Try again unless timeout. finished = ((time(0) - start_time) > timeout_seconds); if ((finished) && (timeout_seconds == 0)) { m_error_code = {errno, "write()_thread_block"};