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
14b17c36
Commit
14b17c36
authored
Mar 18, 2019
by
antirez
Browse files
replicaofCommand() refactoring: stay into 80 cols.
parent
b78ac354
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
14b17c36
...
...
@@ -2053,8 +2053,11 @@ void replicaofCommand(client *c) {
/* Check if we are already attached to the specified slave */
if
(
server
.
masterhost
&&
!
strcasecmp
(
server
.
masterhost
,
c
->
argv
[
1
]
->
ptr
)
&&
server
.
masterport
==
port
)
{
serverLog
(
LL_NOTICE
,
"REPLICAOF would result into synchronization with the master we are already connected with. No operation performed."
);
addReplySds
(
c
,
sdsnew
(
"+OK Already connected to specified master
\r\n
"
));
serverLog
(
LL_NOTICE
,
"REPLICAOF would result into synchronization "
"with the master we are already connected "
"with. No operation performed."
);
addReplySds
(
c
,
sdsnew
(
"+OK Already connected to specified "
"master
\r\n
"
));
return
;
}
/* There was no previous master or the user specified a different one,
...
...
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