Cluster: add sender flags in cluster bus messages header.

Sender flags were not propagated for the sender, but only for nodes in
the gossip section. This is odd and in the next commits we'll need to
get updated flags for the sender node, so this commit adds a new field
in the cluster messages header.

The message header is the same size as we reused some free space that
was marked as 'unused' because of alignment concerns.
This commit is contained in:
antirez
2013-03-20 10:32:00 +01:00
parent d15b027d91
commit 026b9483db
2 changed files with 3 additions and 1 deletions

View File

@ -1156,6 +1156,7 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
REDIS_CLUSTER_NAMELEN);
}
hdr->port = htons(server.port);
hdr->flags = htons(server.cluster->myself->flags);
hdr->state = server.cluster->state;
memset(hdr->configdigest,0,32); /* FIXME: set config digest */