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
2bc52b2c
Commit
2bc52b2c
authored
Apr 07, 2011
by
antirez
Browse files
useless newline removed from log message
parent
d01a6bb3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
2bc52b2c
...
@@ -505,6 +505,7 @@ int clusterProcessPacket(clusterLink *link) {
...
@@ -505,6 +505,7 @@ int clusterProcessPacket(clusterLink *link) {
sender
=
clusterLookupNode
(
hdr
->
sender
);
sender
=
clusterLookupNode
(
hdr
->
sender
);
if
(
type
==
CLUSTERMSG_TYPE_PING
||
type
==
CLUSTERMSG_TYPE_MEET
)
{
if
(
type
==
CLUSTERMSG_TYPE_PING
||
type
==
CLUSTERMSG_TYPE_MEET
)
{
int
update_config
=
0
;
redisLog
(
REDIS_DEBUG
,
"Ping packet received: %p"
,
link
->
node
);
redisLog
(
REDIS_DEBUG
,
"Ping packet received: %p"
,
link
->
node
);
/* Add this node if it is new for us and the msg type is MEET.
/* Add this node if it is new for us and the msg type is MEET.
...
@@ -518,6 +519,7 @@ int clusterProcessPacket(clusterLink *link) {
...
@@ -518,6 +519,7 @@ int clusterProcessPacket(clusterLink *link) {
nodeIp2String
(
node
->
ip
,
link
);
nodeIp2String
(
node
->
ip
,
link
);
node
->
port
=
ntohs
(
hdr
->
port
);
node
->
port
=
ntohs
(
hdr
->
port
);
clusterAddNode
(
node
);
clusterAddNode
(
node
);
update_config
=
1
;
}
}
/* Get info from the gossip section */
/* Get info from the gossip section */
...
@@ -525,6 +527,9 @@ int clusterProcessPacket(clusterLink *link) {
...
@@ -525,6 +527,9 @@ int clusterProcessPacket(clusterLink *link) {
/* Anyway reply with a PONG */
/* Anyway reply with a PONG */
clusterSendPing
(
link
,
CLUSTERMSG_TYPE_PONG
);
clusterSendPing
(
link
,
CLUSTERMSG_TYPE_PONG
);
/* Update config if needed */
if
(
update_config
)
clusterSaveConfigOrDie
();
}
else
if
(
type
==
CLUSTERMSG_TYPE_PONG
)
{
}
else
if
(
type
==
CLUSTERMSG_TYPE_PONG
)
{
int
update_state
=
0
;
int
update_state
=
0
;
int
update_config
=
0
;
int
update_config
=
0
;
...
@@ -879,7 +884,7 @@ void clusterCron(void) {
...
@@ -879,7 +884,7 @@ void clusterCron(void) {
* normal PING packets. */
* normal PING packets. */
node
->
flags
&=
~
REDIS_NODE_MEET
;
node
->
flags
&=
~
REDIS_NODE_MEET
;
redisLog
(
REDIS_NOTICE
,
"Connecting with Node %.40s at %s:%d
\n
"
,
node
->
name
,
node
->
ip
,
node
->
port
+
REDIS_CLUSTER_PORT_INCR
);
redisLog
(
REDIS_NOTICE
,
"Connecting with Node %.40s at %s:%d"
,
node
->
name
,
node
->
ip
,
node
->
port
+
REDIS_CLUSTER_PORT_INCR
);
}
}
}
}
dictReleaseIterator
(
di
);
dictReleaseIterator
(
di
);
...
...
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