From mboxrd@z Thu Jan 1 00:00:00 1970 From: fabbione@sourceware.org Date: 30 Dec 2007 09:30:15 -0000 Subject: [Cluster-devel] cluster/cman/daemon ais.c Message-ID: <20071230093015.15029.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- cluster/cman/daemon/ais.c 2007/12/13 13:39:58 1.56 +++ cluster/cman/daemon/ais.c 2007/12/30 09:30:15 1.57 @@ -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; }