X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/63fd13996d5ff19a642709aef78d655939cf8ced..2ebd2720b37dcca3b6e0c18377bd69e9eaf541fc:/src/networking.c diff --git a/src/networking.c b/src/networking.c index f1c6627c..59512f0f 100644 --- a/src/networking.c +++ b/src/networking.c @@ -519,7 +519,7 @@ void freeClient(redisClient *c) { /* Case 2: we lost the connection with the master. */ if (c->flags & REDIS_MASTER) { server.master = NULL; - server.replstate = REDIS_REPL_CONNECT; + server.repl_state = REDIS_REPL_CONNECT; server.repl_down_since = time(NULL); /* Since we lost the connection with the master, we should also * close the connection with all our slaves if we have any, so @@ -997,8 +997,12 @@ sds getAllClientsInfoString(void) { listRewind(server.clients,&li); while ((ln = listNext(&li)) != NULL) { + sds cs; + client = listNodeValue(ln); - o = sdscatsds(o,getClientInfoString(client)); + cs = getClientInfoString(client); + o = sdscatsds(o,cs); + sdsfree(cs); o = sdscatlen(o,"\n",1); } return o;