Skip to contentSkip to conversation

cluster/cman/daemon ais.c

Cluster-devel [email protected] 1 participant 1 message Dec 30, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-12-30 09:30:15

Modified files:
cman/daemon : ais.c

Log message:
Fix error reporting to aisexec.

aisexec expects an error_string string set by config_read if config_read fails. The lack of error_string is not checked by aisexec that will segfault.

Set error_string properly and clean up the old errorstring that is not used.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/ais.c.diff?cvsroot=cluster&r1=1.56&r2=1.57

cman/daemon/ais.c +1 -2
@@ -62,7 +62,6 @@
 int num_ais_nodes;
 
 static int config_run;
-static char errorstring[512];
 static int startup_pipe;
 static unsigned int debug_mask;
 static int first_trans = 1;
@@ -231,7 +230,7 @@
 	if (error)
 	{
 		write_cman_pipe("Error reading config from CCS");
-		sprintf(errorstring, "Error reading config from CCS");
+		*error_string = "Error reading config from CCS";
 		return -1;
 	}