mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
just minor aesthetic changes to cluster.c
This commit is contained in:
parent
eab0e26e03
commit
ad7a86fbe0
@ -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) {
|
|||||||
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 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user