From 7bf7b7350cb16d2bc5084d41469f96c9565bf089 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 10 Feb 2014 15:55:21 +0100 Subject: [PATCH] Cluster: signature changed to "RCmb" (Redis Cluster message bus). Sounds better after all. --- src/cluster.c | 4 ++-- src/cluster.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index 8535da2f..ce604aee 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -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); diff --git a/src/cluster.h b/src/cluster.h index 20889b6e..ef466c82 100644 --- a/src/cluster.h +++ b/src/cluster.h @@ -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 */