提交 b82b66b5 编写于 作者: A antirez

Cluster: signature changed to "RCmb" (Redis Cluster message bus).

Sounds better after all.
上级 b6e04f55
......@@ -1168,7 +1168,7 @@ int clusterProcessPacket(clusterLink *link) {
/* Perform sanity checks */
if (totlen < 16) return 1; /* At least signature, version, totlen, count. */
if (hdr->sig[0] != 'R' || hdr->sig[1] != 'C' ||
hdr->sig[2] != 'i' || hdr->sig[3] != 'b') return 1; /* Bad signature. */
hdr->sig[2] != 'm' || hdr->sig[3] != 'b') return 1; /* Bad signature. */
if (ntohs(hdr->ver) != 0) return 1; /* Can't handle versions other than 0. */
if (totlen > sdslen(link->rcvbuf)) return 1;
if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_PONG ||
......@@ -1682,7 +1682,7 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
memset(hdr,0,sizeof(*hdr));
hdr->sig[0] = 'R';
hdr->sig[1] = 'C';
hdr->sig[2] = 'i';
hdr->sig[2] = 'm';
hdr->sig[3] = 'b';
hdr->type = htons(type);
memcpy(hdr->sender,myself->name,REDIS_CLUSTER_NAMELEN);
......
......@@ -195,7 +195,7 @@ union clusterMsgData {
typedef struct {
char sig[4]; /* Siganture "RCib" (Redis Cluster internal bus). */
char sig[4]; /* Siganture "RCmb" (Redis Cluster message bus). */
uint16_t ver; /* Protocol version, currently set to 0. */
uint16_t notused0; /* 2 bytes not used. */
uint32_t totlen; /* Total length of this message */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册