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

Sounds better after all.
This commit is contained in:
antirez 2014-02-10 15:55:21 +01:00
parent dced9c0619
commit 7bf7b7350c
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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 */