*actions = g_list_append(*actions, down_node);  slist_iter( rsc, resource_t, node->details->running_rsc, llpc,
stonith_node = action_new(action_id++,NULL,stonith_op); stonith_node->node     = node; stonith_node->runnable = TRUE;
stage6(GListPtr *actions, GListPtr *action_constraints,       GListPtr stonith_nodes, GListPtr shutdown_nodes){	int lpc = 0;	int llpc = 0;	action_t *down_node = NULL;	slist_iter(		node, node_t, shutdown_nodes, lpc,		down_node =			action_new(action_id++, NULL, shutdown_crm);		down_node->node = node;		down_node->runnable = TRUE;		*actions = g_list_append(*actions, down_node);				slist_iter(			rsc, resource_t, node->details->running_rsc, llpc,						order_constraint_t *order = (order_constraint_t*)				crm_malloc(sizeof(order_constraint_t));			/* stop resources before shutdown */			order->id = order_id++;			order->lh_action = rsc->stop;			order->rh_action = down_node;			order->strength = must;			crm_debug_action(				print_action("LH (Shutdown)",					     order->lh_action, FALSE));			crm_debug_action(				print_action("RH (Shutdown)",					     order->rh_action, FALSE));						*action_constraints =				g_list_append(*action_constraints, order);			);		);	slist_iter(		node, node_t, stonith_nodes, lpc,			action_t *stonith_node =			action_new(action_id++, NULL, stonith_op);		stonith_node->node = node;		stonith_node->runnable = TRUE;		*actions = g_list_append(*actions, stonith_node);		slist_iter(			rsc, resource_t, node->details->running_rsc, llpc,						order_constraint_t *order = NULL;			/*			 * Mark the stop as irrelevant			 *			 * Possibly one day failed actions wont terminate			 *   the transition, but not yet			 */			rsc->stop->discard = TRUE;			/* This is always the opposite of the discard. */			rsc->stop->optional = ! rsc->stop->discard;			/* try stopping the resource before stonithing the node			 *			 * if the stop succeeds, the transitioner can then			 * decided if  stonith is needed			 */			order = (order_constraint_t*)				crm_malloc(sizeof(order_constraint_t));			order->lh_action = rsc->stop;			order->rh_action = stonith_node;			order->id = order_id++;			order->strength = must;			*action_constraints =				g_list_append(*action_constraints, order);			/* stonith before start */			order = (order_constraint_t*)				crm_malloc(sizeof(order_constraint_t));			order->id = order_id++;			order->lh_action = stonith_node;			order->rh_action = rsc->start;			order->strength = must;			*action_constraints =				g_list_append(*action_constraints, order);			);		);		return TRUE;}