Set the i-th entry of the gossip section in the message pointed by 'hdr' * to the info of the specified node 'n'. */
| 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'. */ |
| 2520 | void clusterSetGossipEntry(clusterMsg *hdr, int i, clusterNode *n) { |
| 2521 | clusterMsgDataGossip *gossip; |
| 2522 | gossip = &(hdr->data.ping.gossip[i]); |
| 2523 | memcpy(gossip->nodename,n->name,CLUSTER_NAMELEN); |
| 2524 | gossip->ping_sent = htonl(n->ping_sent/1000); |
| 2525 | gossip->pong_received = htonl(n->pong_received/1000); |
| 2526 | memcpy(gossip->ip,n->ip,sizeof(n->ip)); |
| 2527 | gossip->port = htons(n->port); |
| 2528 | gossip->cport = htons(n->cport); |
| 2529 | gossip->flags = htons(n->flags); |
| 2530 | gossip->pport = htons(n->pport); |
| 2531 | gossip->notused1 = 0; |
| 2532 | } |
| 2533 | |
| 2534 | /* Send a PING or PONG packet to the specified node, making sure to add enough |
| 2535 | * gossip information. */ |
no test coverage detected