[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/daemon commands.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield sourceware org	2008-01-02 09:27:12

Modified files:
	cman/daemon    : commands.c 

Log message:
	totempg_ifaces_get() always copies INTERFACE_MAX addresses
	so make sure we alloate enough space for them all.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&r1=1.77&r2=1.78

--- cluster/cman/daemon/commands.c	2007/12/05 14:28:58	1.77
+++ cluster/cman/daemon/commands.c	2008/01/02 09:27:12	1.78
@@ -345,7 +345,8 @@
 	int addrlen=0;
 	unsigned int numaddrs=1;
 	char **status;
-	struct totem_ip_address node_ifs[num_interfaces];
+	struct totem_ip_address node_ifs[INTERFACE_MAX];
+	/* totempg_ifaces_get always copies INTERFACE_MAX addresses */
 
 	strcpy(unode->name, node->name);
 	unode->jointime = node->join_time;
@@ -361,7 +362,6 @@
 	   must ask for them */
 	totempg_ifaces_get(node->node_id, node_ifs, &status, &numaddrs);
 
-
 	totemip_totemip_to_sockaddr_convert(&node_ifs[0], 0, &ss, &addrlen);
 	memcpy(unode->addr, &ss, addrlen);
 	unode->addrlen = addrlen;
@@ -1173,7 +1173,7 @@
 	int i;
 	char *outbuf = *retbuf + offset;
 	struct cl_get_node_addrs *addrs = (struct cl_get_node_addrs *)outbuf;
-	struct totem_ip_address node_ifs[num_interfaces];
+	struct totem_ip_address node_ifs[INTERFACE_MAX]; /* totempg_ifaces_get always copies INTERFACE_MAX addresses */
 	struct cluster_node *node;
 	char **status;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]