mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Fix build errors caused by #2358.
This commit is contained in:
parent
19880ab851
commit
c241f51607
11
src/config.c
11
src/config.c
@ -887,17 +887,6 @@ void configSetCommand(client *c) {
|
|||||||
} config_set_special_field("masterauth") {
|
} config_set_special_field("masterauth") {
|
||||||
zfree(server.masterauth);
|
zfree(server.masterauth);
|
||||||
server.masterauth = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
server.masterauth = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"maxmemory")) {
|
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
|
||||||
ll < 0) goto badfmt;
|
|
||||||
server.maxmemory = ll;
|
|
||||||
if (server.maxmemory) {
|
|
||||||
if (server.maxmemory < zmalloc_used_memory()) {
|
|
||||||
redisLog(REDIS_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in key eviction and/or the inability to accept new write commands depending on the maxmemory-policy.");
|
|
||||||
}
|
|
||||||
freeMemoryIfNeeded();
|
|
||||||
}
|
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"maxclients")) {
|
|
||||||
} config_set_special_field("cluster-announce-ip") {
|
} config_set_special_field("cluster-announce-ip") {
|
||||||
zfree(server.cluster_announce_ip);
|
zfree(server.cluster_announce_ip);
|
||||||
server.cluster_announce_ip = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
server.cluster_announce_ip = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user