Skip to content

Commit

Permalink
Fix receiving after fifo overrun
Browse files Browse the repository at this point in the history
After fifo overrun buffer_done remains less than buffer_len and
FD_SET(p->port[ti].s, &read_set) is not called. If firmware has nothing
to send, select always returns 0 and new data is never read even if
fifo buffer gets flushed.
This patch removes check for select timeout, so the remaining data in
buffer may go to fifo.
  • Loading branch information
myokaski committed Jun 21, 2018
1 parent 51de224 commit bb75b1d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions examples/parts/uart_pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ uart_pty_thread(
struct timeval timo = { 0, 500 };
int ret = select(max+1, &read_set, &write_set, NULL, &timo);

if (!ret)
continue;
if (ret < 0)
break;

Expand Down

0 comments on commit bb75b1d

Please sign in to comment.