Skip to contentSkip to conversation

cluster/rgmanager/src/daemons groups.c

Cluster-devel [email protected] 1 participant 1 message Nov 27, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2006-11-27 22:21:30

Modified files:
rgmanager/src/daemons: groups.c

Log message:
Fix #192117 - patch ported to RHEL4 from head by Lenny Maiorani

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.8.2.17&r2=1.8.2.18

rgmanager/src/daemons/groups.c +13 -2
@@ -879,8 +879,19 @@
 		if (curr->rn_resource->r_flags & RF_NEEDSTART)
 			need_init = 1;
 
-		if (get_rg_state_local(name, &svcblk) < 0) {
-			continue;
+		if (!need_init) {
+			if (get_rg_state_local(name, &svcblk) < 0)
+				continue;
+		} else {
+			if (rg_lock(name, &lockp) != 0)
+				continue;
+
+			if (get_rg_state(name, &svcblk) < 0) {
+				rg_unlock(name, lockp);
+				continue;
+			}
+
+			rg_unlock(name, lockp);
 		}
 
 		if (!need_init && svcblk.rs_owner != my_id()) {