From: batt Date: Fri, 2 Oct 2009 19:29:20 +0000 (+0000) Subject: Fix FIFO full handling. X-Git-Tag: 2.3.0~77 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d14ced124d89deec72e0c8d30e8d15d6a4504b76;p=bertos.git Fix FIFO full handling. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3004 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/net/afsk.c b/bertos/net/afsk.c index 5792967b..4ebf5454 100644 --- a/bertos/net/afsk.c +++ b/bertos/net/afsk.c @@ -205,11 +205,13 @@ static void hdlc_parse(bool bit) { if ((hdlc_currchar == HDLC_FLAG || hdlc_currchar == HDLC_RESET - || hdlc_currchar == AX25_ESC) - && !fifo_isfull(&rx_fifo)) - fifo_push(&rx_fifo, AX25_ESC); - else - hdlc_rxstart = false; + || hdlc_currchar == AX25_ESC)) + { + if (!fifo_isfull(&rx_fifo)) + fifo_push(&rx_fifo, AX25_ESC); + else + hdlc_rxstart = false; + } if (!fifo_isfull(&rx_fifo)) fifo_push(&rx_fifo, hdlc_currchar);