summaryrefslogtreecommitdiffstats
path: root/gatchat/gatserver.c
diff options
context:
space:
mode:
authorOlivier Guiter <olivier.guiter@linux.intel.com>2011-02-10 14:59:42 +0100
committerDenis Kenzior <denkenz@gmail.com>2011-02-14 09:51:30 -0600
commita1f5a5520ac0e71bada9aa646d3aff9a319a7ed7 (patch)
tree54ab165fc3e55ec933039a447a9488a4d2df0e92 /gatchat/gatserver.c
parent8aa51ba42f64e9feb0c05561106e76de50335677 (diff)
downloadofono-a1f5a5520ac0e71bada9aa646d3aff9a319a7ed7.tar.bz2
gatserver: Add ATS5 command feature
Diffstat (limited to 'gatchat/gatserver.c')
-rw-r--r--gatchat/gatserver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index be9f79a8..7eceb2cc 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -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;