Skip to contentSkip to conversation

cluster/ccs/daemon ccsd.c cluster_mgr.c misc.c ...

Cluster-devel [email protected] 1 participant 1 message Oct 20, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-10-20 14:18:00

Modified files:
ccs/daemon : ccsd.c cluster_mgr.c misc.c misc.h

Log message:
This is the fix for Bugzilla Bug 210732: ccsd doesn't spot cluster going quorate. The fix was written by Patrick Caulfield, but I tested it and it now works properly. I'm doing the commit because Patrick is out today.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/ccsd.c.diff?cvsroot=cluster&r1=1.26&r2=1.27
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/cluster_mgr.c.diff?cvsroot=cluster&r1=1.22&r2=1.23
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/misc.c.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/misc.h.diff?cvsroot=cluster&r1=1.2&r2=1.3

ccs/daemon/ccsd.c +1 -1
@@ -34,7 +34,7 @@
 
 #include "copyright.cf"
 
-extern int quorate;
+extern volatile int quorate;
 int no_manager_opt=0;
 static int exit_now=0;
 static unsigned int flags=0;
ccs/daemon/cluster_mgr.c +1 -3
@@ -433,18 +433,16 @@
 
   cman_start_notification(handle, cman_callback);
 
-  cman_fd = cman_get_fd(handle);
   quorate = cman_is_quorate(handle);
 
   log_msg("Initial status:: %s\n", (quorate)? "Quorate" : "Inquorate");
 
   members = get_member_list(handle);
 
-
-
   while (1)
   {
     FD_ZERO(&rset);
+    cman_fd = cman_get_fd(handle);
 
     FD_SET(ccsd_fd, &rset);
     FD_SET(cman_fd, &rset);
ccs/daemon/misc.c +1 -1
@@ -34,7 +34,7 @@
 #include "debug.h"
 #include "misc.h"
 
-int quorate = 0;
+volatile int quorate = 0;
 
 int update_required = 0;
 pthread_mutex_t update_lock;
ccs/daemon/misc.h +1 -1
@@ -18,7 +18,7 @@
 } open_doc_t;
 
 
-extern int quorate;
+extern volatile int quorate;
 extern int update_required;
 extern pthread_mutex_t update_lock;
 extern open_doc_t *master_doc;