MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clusterNodeIsInGossipSection

Function clusterNodeIsInGossipSection

app/redis-6.2.6/src/cluster.c:2509–2516  ·  view source on GitHub ↗

Return non zero if the node is already present in the gossip section of the * message pointed by 'hdr' and having 'count' gossip entries. Otherwise * zero is returned. Helper for clusterSendPing(). */

Source from the content-addressed store, hash-verified

2507 * message pointed by 'hdr' and having 'count' gossip entries. Otherwise
2508 * zero is returned. Helper for clusterSendPing(). */
2509int clusterNodeIsInGossipSection(clusterMsg *hdr, int count, clusterNode *n) {
2510 int j;
2511 for (j = 0; j < count; j++) {
2512 if (memcmp(hdr->data.ping.gossip[j].nodename,n->name,
2513 CLUSTER_NAMELEN) == 0) break;
2514 }
2515 return j != count;
2516}
2517
2518/* Set the i-th entry of the gossip section in the message pointed by 'hdr'
2519 * to the info of the specified node 'n'. */

Callers 1

clusterSendPingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected