From 92a6b18ef4ae59cd17dac3bee5f76a75a35fd83b Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 25 Mar 2011 17:26:31 -0500 Subject: [PATCH] gatsyntax: Support echo of empty lines --- gatchat/gatsyntax.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gatchat/gatsyntax.c b/gatchat/gatsyntax.c index 7899248b..83aa5c0f 100644 --- a/gatchat/gatsyntax.c +++ b/gatchat/gatsyntax.c @@ -91,7 +91,10 @@ static GAtSyntaxResult gsmv1_feed(GAtSyntax *syntax, case GSMV1_STATE_INITIAL_CR: if (byte == '\n') syntax->state = GSMV1_STATE_INITIAL_LF; - else + else if (byte == '\r') { + syntax->state = GSMV1_STATE_IDLE; + return G_AT_SYNTAX_RESULT_UNRECOGNIZED; + } else syntax->state = GSMV1_STATE_ECHO; break;