summaryrefslogtreecommitdiffstats
path: root/gatchat/gatsyntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'gatchat/gatsyntax.c')
-rw-r--r--gatchat/gatsyntax.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gatchat/gatsyntax.c b/gatchat/gatsyntax.c
index 5db01a7f..d7c9ee23 100644
--- a/gatchat/gatsyntax.c
+++ b/gatchat/gatsyntax.c
@@ -182,6 +182,16 @@ static GAtSyntaxResult gsmv1_feed(GAtSyntax *syntax,
case GSMV1_STATE_GARBAGE:
if (byte == '\r')
syntax->state = GSMV1_STATE_GARBAGE_CHECK_LF;
+ /* This handles the case of echo of the PDU terminated
+ * by CtrlZ character
+ */
+ else if (byte == 26) {
+ syntax->state = GSMV1_STATE_IDLE;
+ res = G_AT_SYNTAX_RESULT_UNRECOGNIZED;
+ i += 1;
+ goto out;
+ }
+
break;
case GSMV1_STATE_GARBAGE_CHECK_LF: