Send an UPDATE message to the specified link carrying the specified 'node' * slots configuration. The node name, slots bitmap, and configEpoch info * are included. */
| 2761 | * slots configuration. The node name, slots bitmap, and configEpoch info |
| 2762 | * are included. */ |
| 2763 | void clusterSendUpdate(clusterLink *link, clusterNode *node) { |
| 2764 | clusterMsg buf[1]; |
| 2765 | clusterMsg *hdr = (clusterMsg*) buf; |
| 2766 | |
| 2767 | if (link == NULL) return; |
| 2768 | clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_UPDATE); |
| 2769 | memcpy(hdr->data.update.nodecfg.nodename,node->name,CLUSTER_NAMELEN); |
| 2770 | hdr->data.update.nodecfg.configEpoch = htonu64(node->configEpoch); |
| 2771 | memcpy(hdr->data.update.nodecfg.slots,node->slots,sizeof(node->slots)); |
| 2772 | clusterSendMessage(link,(unsigned char*)buf,ntohl(hdr->totlen)); |
| 2773 | } |
| 2774 | |
| 2775 | /* Send a MODULE message. |
| 2776 | * |
no test coverage detected