Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3be89312
"src/cluster_legacy.c" did not exist on "9d31768cbb1702aaf47b068e3146f572021098de"
Commit
3be89312
authored
Mar 04, 2013
by
antirez
Browse files
Make sure replicationSetMaster() works when ip argument is not an sds.
parent
b8a28bf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
3be89312
...
@@ -1229,7 +1229,7 @@ int cancelReplicationHandshake(void) {
...
@@ -1229,7 +1229,7 @@ int cancelReplicationHandshake(void) {
/* Set replication to the specified master address and port. */
/* Set replication to the specified master address and port. */
void
replicationSetMaster
(
char
*
ip
,
int
port
)
{
void
replicationSetMaster
(
char
*
ip
,
int
port
)
{
sdsfree
(
server
.
masterhost
);
sdsfree
(
server
.
masterhost
);
server
.
masterhost
=
sds
dup
(
ip
);
server
.
masterhost
=
sds
new
(
ip
);
server
.
masterport
=
port
;
server
.
masterport
=
port
;
if
(
server
.
master
)
freeClient
(
server
.
master
);
if
(
server
.
master
)
freeClient
(
server
.
master
);
disconnectSlaves
();
/* Force our slaves to resync with us as well. */
disconnectSlaves
();
/* Force our slaves to resync with us as well. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment