summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-09-10 10:43:39 +0200
committerantirez <antirez@gmail.com>2018-09-10 10:43:39 +0200
commit4a1dc0cd86a696f194b52539e078b4d32c935691 (patch)
treeebd9db02c61f75f071a40a2d96a3a2548e561d50
parent14629278e3b5f0af862c3085007b70d9d6ea68f1 (diff)
downloadredis-4a1dc0cd86a696f194b52539e078b4d32c935691.tar.gz
Slave removal: SLAVEOF -> REPLICAOF. SLAVEOF is now an alias.
-rw-r--r--src/replication.c2
-rw-r--r--src/server.c3
-rw-r--r--src/server.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/replication.c b/src/replication.c
index 6d589c012..11fd34791 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -1997,7 +1997,7 @@ void replicationHandleMasterDisconnection(void) {
* the slaves only if we'll have to do a full resync with our master. */
}
-void slaveofCommand(client *c) {
+void replicaofCommand(client *c) {
/* SLAVEOF is not allowed in cluster mode as replication is automatically
* configured using the current address of the master node. */
if (server.cluster_enabled) {
diff --git a/src/server.c b/src/server.c
index 9d2a3718d..92a3b17c0 100644
--- a/src/server.c
+++ b/src/server.c
@@ -260,7 +260,8 @@ struct redisCommand redisCommandTable[] = {
{"touch",touchCommand,-2,"rF",0,NULL,1,1,1,0,0},
{"pttl",pttlCommand,2,"rFR",0,NULL,1,1,1,0,0},
{"persist",persistCommand,2,"wF",0,NULL,1,1,1,0,0},
- {"slaveof",slaveofCommand,3,"ast",0,NULL,0,0,0,0,0},
+ {"slaveof",replicaofCommand,3,"ast",0,NULL,0,0,0,0,0},
+ {"replicaof",replicaofCommand,3,"ast",0,NULL,0,0,0,0,0},
{"role",roleCommand,1,"lst",0,NULL,0,0,0,0,0},
{"debug",debugCommand,-2,"as",0,NULL,0,0,0,0,0},
{"config",configCommand,-2,"last",0,NULL,0,0,0,0,0},
diff --git a/src/server.h b/src/server.h
index 09348585b..ae20aff6a 100644
--- a/src/server.h
+++ b/src/server.h
@@ -1998,7 +1998,7 @@ void ttlCommand(client *c);
void touchCommand(client *c);
void pttlCommand(client *c);
void persistCommand(client *c);
-void slaveofCommand(client *c);
+void replicaofCommand(client *c);
void roleCommand(client *c);
void debugCommand(client *c);
void msetCommand(client *c);