diff options
author | Eugene Tarassov | 2013-08-28 06:42:35 +0000 |
---|---|---|
committer | Eugene Tarassov | 2013-08-28 06:42:35 +0000 |
commit | 3374548567e5255d17c558bad2235a9a325d0466 (patch) | |
tree | 62cdb990cee8bc19460aaa7aa5c9801b4caf119a /agent/tcf/framework/protocol.c | |
parent | 1bbb436cdf19d40441abafc2ff5f6f1e09db6502 (diff) | |
download | org.eclipse.tcf.agent-3374548567e5255d17c558bad2235a9a325d0466.tar.gz org.eclipse.tcf.agent-3374548567e5255d17c558bad2235a9a325d0466.tar.xz org.eclipse.tcf.agent-3374548567e5255d17c558bad2235a9a325d0466.zip |
TCF Agent: performance improvements in the protocol handling code
Diffstat (limited to 'agent/tcf/framework/protocol.c')
-rw-r--r-- | agent/tcf/framework/protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/tcf/framework/protocol.c b/agent/tcf/framework/protocol.c index 3e1228aa..f1e72851 100644 --- a/agent/tcf/framework/protocol.c +++ b/agent/tcf/framework/protocol.c @@ -97,8 +97,8 @@ static void read_stringz(InputStream * inp, char * str, size_t size) { unsigned len = 0; for (;;) { int ch = read_stream(inp); - if (ch == 0) break; - if (ch < 0) { + if (ch <= 0) { + if (ch == 0) break; trace(LOG_ALWAYS, "Unexpected end of message"); exception(ERR_PROTOCOL); } |