summaryrefslogtreecommitdiffstats
path: root/gatchat/gatserver.c
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2010-03-31 10:40:08 +0800
committerDenis Kenzior <denkenz@gmail.com>2010-03-30 21:59:34 -0500
commitc288921bab72de2a3ac41e5a903b3e43934dd788 (patch)
treed4bda096cb54e4b39017569d748103f5dc0d7f35 /gatchat/gatserver.c
parent1f5e78590110a18c2a00d3f10ad8fae0c7fb573f (diff)
downloadofono-c288921bab72de2a3ac41e5a903b3e43934dd788.tar.bz2
Fix ignore incoming bytes during parsing
Server processes one command line at one time, so ignore the rest incoming bytes during the command parsing.
Diffstat (limited to 'gatchat/gatserver.c')
-rw-r--r--gatchat/gatserver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 4904adf6..2fca9e51 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -771,6 +771,10 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
g_at_util_debug_chat(TRUE, (char *)buf, rbytes,
server->debugf, server->debug_data);
+ /* Ignore incoming bytes when processing a command line */
+ if (server->processing_cmdline)
+ continue;
+
read_count++;
total_read += rbytes;