Use specialized function to add multi bulk reply length

This commit is contained in:
Pieter Noordhuis
2010-09-02 12:38:34 +02:00
parent 57b0738011
commit 0537e7bf80
9 changed files with 14 additions and 10 deletions

View File

@ -107,7 +107,7 @@ void execCommand(redisClient *c) {
unwatchAllKeys(c); /* Unwatch ASAP otherwise we'll waste CPU cycles */
orig_argv = c->argv;
orig_argc = c->argc;
addReplySds(c,sdscatprintf(sdsempty(),"*%d\r\n",c->mstate.count));
addReplyMultiBulkLen(c,c->mstate.count);
for (j = 0; j < c->mstate.count; j++) {
c->argc = c->mstate.commands[j].argc;
c->argv = c->mstate.commands[j].argv;