]> git.saurik.com Git - redis.git/blobdiff - src/config.c
Removed unused command flags
[redis.git] / src / config.c
index 8a5ad6c2bc8cd6d0671b2194dad057d23ae7ac7f..ff4c130f40044b3ed62c85b93534f63c5fc5ef11 100644 (file)
@@ -241,6 +241,7 @@ void configSetCommand(redisClient *c) {
         if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
             ll < 0) goto badfmt;
         server.maxmemory = ll;
+        if (server.maxmemory) freeMemoryIfNeeded();
     } else if (!strcasecmp(c->argv[2]->ptr,"timeout")) {
         if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
             ll < 0 || ll > LONG_MAX) goto badfmt;
@@ -409,6 +410,7 @@ void configGetCommand(redisClient *c) {
 }
 
 void configCommand(redisClient *c) {
+    c->argv[c->argc-1] = tryObjectEncoding(c->argv[c->argc-1]);
     if (!strcasecmp(c->argv[1]->ptr,"set")) {
         if (c->argc != 4) goto badarity;
         configSetCommand(c);