Skip to content

Commit

Permalink
Tidied comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Sikora committed Nov 30, 2021
1 parent 0869e82 commit 1bccacc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/satterm_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
}
Expand Down Expand Up @@ -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"};
Expand Down

0 comments on commit 1bccacc

Please sign in to comment.