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(). */
| 2565 | * message pointed by 'hdr' and having 'count' gossip entries. Otherwise |
| 2566 | * zero is returned. Helper for clusterSendPing(). */ |
| 2567 | int clusterNodeIsInGossipSection(clusterMsg *hdr, int count, clusterNode *n) { |
| 2568 | int j; |
| 2569 | for (j = 0; j < count; j++) { |
| 2570 | if (memcmp(hdr->data.ping.gossip[j].nodename,n->name, |
| 2571 | CLUSTER_NAMELEN) == 0) break; |
| 2572 | } |
| 2573 | return j != count; |
| 2574 | } |
| 2575 | |
| 2576 | /* Set the i-th entry of the gossip section in the message pointed by 'hdr' |
| 2577 | * to the info of the specified node 'n'. */ |