Skip to content
Browse files

new parsing code bugfixing

  • Loading branch information...
1 parent 34a719d commit a4f3f93b90c7cc688ffff665914bdadc224847fc @antirez antirez committed Sep 17, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/networking.c
View
5 src/networking.c
@@ -664,6 +664,8 @@ void closeTimedoutClients(void) {
}
void processInputBuffer(redisClient *c) {
+ int seeknewline = 0;
+
again:
/* Before to process the input buffer, make sure the client is not
* waitig for a blocking operation such as BLPOP. Note that the first
@@ -672,6 +674,9 @@ void processInputBuffer(redisClient *c) {
* in the input buffer the client may be blocked, and the "goto again"
* will try to reiterate. The following line will make it return asap. */
if (c->flags & REDIS_BLOCKED || c->flags & REDIS_IO_WAIT) return;
+
+ if (seeknewline && c->bulklen == -1) c->newline = strchr(c->querybuf,'\n');
+ seeknewline = 1;
if (c->bulklen == -1) {
/* Read the first line of the query */
size_t querylen;

0 comments on commit a4f3f93

Please sign in to comment.
Something went wrong with that request. Please try again.