gatserver: Exit garbage state on HDLC frame end

This commit is contained in:
Denis Kenzior 2011-02-28 14:29:07 -06:00
parent 6f8675d7fa
commit 4da1a9318c
1 changed files with 2 additions and 1 deletions

View File

@ -792,7 +792,8 @@ static enum ParserResult server_feed(GAtServer *server,
break;
case PARSER_STATE_GARBAGE:
if (byte == s3) {
/* Detect CR or HDLC frame marker flag */
if (byte == s3 || byte == '~') {
server->parser_state = PARSER_STATE_IDLE;
i += 1;
res = PARSER_RESULT_GARBAGE;