Fixed a few broken stuff introduced while merging issue #327 related code in 2.4

This commit is contained in:
antirez 2012-02-15 15:30:29 +01:00
parent 31f9f987ac
commit b3a86b8209
2 changed files with 4 additions and 3 deletions

View File

@ -1564,9 +1564,9 @@ int freeMemoryIfNeeded(void) {
mem_used -= obuf_bytes; mem_used -= obuf_bytes;
} }
} }
if (server.aof_state != REDIS_AOF_OFF) { if (server.appendonly) {
mem_used -= sdslen(server.aof_buf); mem_used -= sdslen(server.aofbuf);
mem_used -= sdslen(server.aof_rewrite_buf); mem_used -= sdslen(server.bgrewritebuf);
} }
/* Check if we are over the memory limit. */ /* Check if we are over the memory limit. */

View File

@ -716,6 +716,7 @@ void getClientsMaxBuffers(unsigned long *longest_output_list,
sds getClientInfoString(redisClient *client); sds getClientInfoString(redisClient *client);
sds getAllClientsInfoString(void); sds getAllClientsInfoString(void);
void rewriteClientCommandVector(redisClient *c, int argc, ...); void rewriteClientCommandVector(redisClient *c, int argc, ...);
unsigned long getClientOutputBufferMemoryUsage(redisClient *c);
void flushSlavesOutputBuffers(void); void flushSlavesOutputBuffers(void);
#ifdef __GNUC__ #ifdef __GNUC__