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
ad7a86fb
Commit
ad7a86fb
authored
Oct 05, 2011
by
antirez
Browse files
just minor aesthetic changes to cluster.c
parent
eab0e26e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
ad7a86fb
...
@@ -493,6 +493,7 @@ void nodeIp2String(char *buf, clusterLink *link) {
...
@@ -493,6 +493,7 @@ void nodeIp2String(char *buf, clusterLink *link) {
/* Update the node address to the IP address that can be extracted
/* Update the node address to the IP address that can be extracted
* from link->fd, and at the specified port. */
* from link->fd, and at the specified port. */
void
nodeUpdateAddress
(
clusterNode
*
node
,
clusterLink
*
link
,
int
port
)
{
void
nodeUpdateAddress
(
clusterNode
*
node
,
clusterLink
*
link
,
int
port
)
{
/* TODO */
}
}
/* When this function is called, there is a packet to process starting
/* When this function is called, there is a packet to process starting
...
@@ -510,8 +511,8 @@ int clusterProcessPacket(clusterLink *link) {
...
@@ -510,8 +511,8 @@ int clusterProcessPacket(clusterLink *link) {
uint16_t
type
=
ntohs
(
hdr
->
type
);
uint16_t
type
=
ntohs
(
hdr
->
type
);
clusterNode
*
sender
;
clusterNode
*
sender
;
redisLog
(
REDIS_DEBUG
,
"---
packet to process %lu bytes (%lu) ---
"
,
redisLog
(
REDIS_DEBUG
,
"---
Processing packet of type %d, %lu bytes
"
,
(
unsigned
long
)
totlen
,
sdslen
(
link
->
rcvbuf
)
);
type
,
(
unsigned
long
)
totlen
);
if
(
totlen
<
8
)
return
1
;
if
(
totlen
<
8
)
return
1
;
if
(
totlen
>
sdslen
(
link
->
rcvbuf
))
return
1
;
if
(
totlen
>
sdslen
(
link
->
rcvbuf
))
return
1
;
if
(
type
==
CLUSTERMSG_TYPE_PING
||
type
==
CLUSTERMSG_TYPE_PONG
||
if
(
type
==
CLUSTERMSG_TYPE_PING
||
type
==
CLUSTERMSG_TYPE_PONG
||
...
...
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