mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-06 12:47:01 +00:00
defect 833
Rabbe reported that the encoding of the ipv4 address in SaClmNodeAddressT is incorrect git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@804 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
42468e12a0
commit
478307dfed
@ -199,10 +199,10 @@ static int clm_exec_init_fn (struct openais_config *openais_config)
|
||||
* Build local cluster node data structure
|
||||
*/
|
||||
thisClusterNode.nodeId = this_ip->sin_addr.s_addr;
|
||||
memcpy (&thisClusterNode.nodeAddress.value, &this_ip->sin_addr,
|
||||
sizeof (struct in_addr));
|
||||
thisClusterNode.nodeAddress.length = sizeof (struct in_addr);
|
||||
strcpy ((char *)thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
|
||||
sprintf (thisClusterNode.nodeAddress.value, "%s", inet_ntoa (this_ip->sin_addr));
|
||||
thisClusterNode.nodeAddress.length = strlen (thisClusterNode.nodeAddress.value);
|
||||
thisClusterNode.nodeAddress.family = SA_CLM_AF_INET;
|
||||
sprintf (thisClusterNode.nodeName.value, "%s", inet_ntoa (this_ip->sin_addr));
|
||||
thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
|
||||
thisClusterNode.member = 1;
|
||||
{
|
||||
|
@ -48,8 +48,9 @@
|
||||
void printSaClmNodeAddressT (SaClmNodeAddressT *nodeAddress) {
|
||||
int i;
|
||||
|
||||
printf ("family=%d - address=", nodeAddress->family);
|
||||
for (i = 0; i < nodeAddress->length; i++) {
|
||||
printf ("%d.", nodeAddress->value[i]);
|
||||
printf ("%c", nodeAddress->value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user