Commit 36c1a7cb authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #2445 from soveran/add-cluster-myid

Add command CLUSTER MYID
parents 3da74083 6201eb0c
...@@ -3760,6 +3760,9 @@ void clusterCommand(redisClient *c) { ...@@ -3760,6 +3760,9 @@ void clusterCommand(redisClient *c) {
o = createObject(REDIS_STRING,ci); o = createObject(REDIS_STRING,ci);
addReplyBulk(c,o); addReplyBulk(c,o);
decrRefCount(o); decrRefCount(o);
} else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) {
/* CLUSTER MYID */
addReplyBulkCBuffer(c,myself->name, REDIS_CLUSTER_NAMELEN);
} else if (!strcasecmp(c->argv[1]->ptr,"slots") && c->argc == 2) { } else if (!strcasecmp(c->argv[1]->ptr,"slots") && c->argc == 2) {
/* CLUSTER SLOTS */ /* CLUSTER SLOTS */
clusterReplyMultiBulkSlots(c); clusterReplyMultiBulkSlots(c);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment