From c288921bab72de2a3ac41e5a903b3e43934dd788 Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Wed, 31 Mar 2010 10:40:08 +0800 Subject: Fix ignore incoming bytes during parsing Server processes one command line at one time, so ignore the rest incoming bytes during the command parsing. --- gatchat/gatserver.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gatchat/gatserver.c') 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; -- cgit v1.2.3