mirror of
https://github.com/fluencelabs/redis
synced 2025-05-06 07:52:13 +00:00
RESP3: Use verbatim in CLUSTER subcommands.
This commit is contained in:
parent
1b3cb3b0de
commit
dd2f695d7e
@ -4252,7 +4252,9 @@ NULL
|
|||||||
}
|
}
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"nodes") && c->argc == 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"nodes") && c->argc == 2) {
|
||||||
/* CLUSTER NODES */
|
/* CLUSTER NODES */
|
||||||
addReplyBulkSds(c,clusterGenNodesDescription(0));
|
sds nodes = clusterGenNodesDescription(0);
|
||||||
|
addReplyVerbatim(c,nodes,sdslen(nodes),"txt");
|
||||||
|
sdsfree(nodes);
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) {
|
||||||
/* CLUSTER MYID */
|
/* CLUSTER MYID */
|
||||||
addReplyBulkCBuffer(c,myself->name, CLUSTER_NAMELEN);
|
addReplyBulkCBuffer(c,myself->name, CLUSTER_NAMELEN);
|
||||||
@ -4494,10 +4496,8 @@ NULL
|
|||||||
"cluster_stats_messages_received:%lld\r\n", tot_msg_received);
|
"cluster_stats_messages_received:%lld\r\n", tot_msg_received);
|
||||||
|
|
||||||
/* Produce the reply protocol. */
|
/* Produce the reply protocol. */
|
||||||
addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n",
|
addReplyVerbatim(c,info,sdslen(info),"txt");
|
||||||
(unsigned long)sdslen(info)));
|
sdsfree(info);
|
||||||
addReplySds(c,info);
|
|
||||||
addReply(c,shared.crlf);
|
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) {
|
||||||
int retval = clusterSaveConfig(1);
|
int retval = clusterSaveConfig(1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user