cluster/cman/daemon ais.c commands.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-07-21 12:25:21
Modified files:
cman/daemon : ais.c commands.c
Log message:
Update to use new openAIS totemip & totempg APIs.
Needs the Openais that's probably going to be released later today ;-)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/ais.c.diff?cvsroot=cluster&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&r1=1.44&r2=1.45
cman/daemon/ais.c +3 -2
@@ -301,9 +301,10 @@ tmp, strlen(tmp)+1);/* Save a local copy */ - ret =totemip_parse (&mcast_addr[num_interfaces], mcast); + ret =totemip_parse (&mcast_addr[num_interfaces], mcast,0 );if (!ret) - ret =totemip_parse (&ifaddrs[num_interfaces], ifaddr); + ret =totemip_parse (&ifaddrs[num_interfaces], ifaddr, + mcast_addr[num_interfaces].family);if (!ret) num_interfaces++;else
cman/daemon/commands.c +6 -4
@@ -307,7 +307,8 @@ {struct sockaddr_storage ss;int addrlen=0 ; -unsigned int numaddrs; +unsigned int numaddrs=1 ; +char **status;struct totem_ip_address node_ifs[num_interfaces];strcpy (unode->name, node->name);
@@ -322,7 +323,7 @@/* Just send the first address. If the user wants the full set they must ask for them */ -totempg_ifaces_get (node->node_id, node_ifs, &numaddrs); +totempg_ifaces_get (node->node_id, node_ifs, &status, &numaddrs);totemip_totemip_to_sockaddr_convert (&node_ifs[0 ],0 , &ss, &addrlen);
@@ -1073,6 +1074,7 @@struct cl_get_node_addrs *addrs = (struct cl_get_node_addrs *)outbuf;struct totem_ip_address node_ifs[num_interfaces];struct cluster_node *node; +char **status;if (retsize <sizeof (struct cl_node_addrs ))return -EINVAL ;
@@ -1088,7 +1090,7 @@if (node->state !=NODESTATE_MEMBER )return 0 ; -if (totempg_ifaces_get (nodeid, node_ifs, (unsigned int *)&addrs->numaddrs)) +if (totempg_ifaces_get (nodeid, node_ifs, &status, (unsigned int *)&addrs->numaddrs))return -errno;for (i=0 ; i<addrs->numaddrs; i++) {
@@ -1711,7 +1713,7 @@struct totem_ip_address ipaddr;struct cluster_node *node; -if (totemip_parse (&ipaddr, nodename)) +if (totemip_parse (&ipaddr, nodename,0 )) {if (!nodeid) {log_msg (LOG_ERR ,"Error, can't find IP address and no nodeid for node %s - ignoring it\n" , nodename);