gatserver: Add ATS5 command feature

This commit is contained in:
Olivier Guiter 2011-02-10 14:59:42 +01:00 committed by Denis Kenzior
parent 8aa51ba42f
commit a1f5a5520a
1 changed files with 5 additions and 1 deletions

View File

@ -796,6 +796,7 @@ static char *extract_line(GAtServer *p, struct ring_buffer *rbuf)
int line_length = 0;
gboolean in_string = FALSE;
char s3 = p->v250.s3;
char s5 = p->v250.s5;
char *line;
int i;
@ -837,7 +838,10 @@ static char *extract_line(GAtServer *p, struct ring_buffer *rbuf)
if (*buf == '"')
in_string = !in_string;
if ((*buf == ' ' || *buf == '\t') && in_string == FALSE)
if (*buf == s5) {
if (i != 0)
i -= 1;
} else if ((*buf == ' ' || *buf == '\t') && in_string == FALSE)
; /* Skip */
else if (*buf != s3)
line[i++] = *buf;