Skip to contentSkip to conversation

cluster/rgmanager/src/daemons restree.c

Cluster-devel [email protected] 1 participant 1 message Sep 28, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2007-09-28 15:36:52

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

Log message:
Clear checks out less than or equal to the level we just checked. #310981

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

rgmanager/src/daemons/restree.c +10 -2
@@ -1097,11 +1097,19 @@
 	node->rn_last_depth = node->rn_actions[idx].ra_depth;
 	node->rn_checked = 1;
 
-	if (x == 0)
+	/* Clear check levels below ours. */
+	for (x=0; node->rn_actions[x].ra_name; x++) {
+		if (strcmp(node->rn_actions[x].ra_name, "status"))
+			continue;
+		if (node->rn_actions[x].ra_depth <= node->rn_last_depth)
+			node->rn_actions[x].ra_last = now;
+	}
+
+	if (node->rn_last_status == 0)
 		return 0;
 
 	if (!has_recover)
-		return x;
+		return node->rn_last_status;
 
 	/* Strange/failed status. Try to recover inline. */
 	if ((x = res_exec(node, RS_RECOVER, 0)) == 0)