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(). */
| 2507 | * message pointed by 'hdr' and having 'count' gossip entries. Otherwise |
| 2508 | * zero is returned. Helper for clusterSendPing(). */ |
| 2509 | int 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'. */ |