crm_trace("Applying RA restrictions to %s", rsc->id); slist_iter( node, node_t, rsc->allowed_nodes, lpc2,  crm_trace("Checking if %s supports %s/%s (%s)", node->details->uname, rsc->agent->class, rsc->agent->type, rsc->agent->version);  if(has_agent(node, rsc->agent) == FALSE) {  crm_trace("Marking node %s unavailable for %s", node->details->uname, rsc->id); node->weight = -1.0; node->fixed = TRUE; } if(node->fixed && node->weight < 0) {  crm_debug("Removing node %s from %s", node->details->uname, rsc->id);  lpc2 = -1; rsc->allowed_nodes = g_list_remove( rsc->allowed_nodes, node); crm_free(node); }  )
rsc->fns->agent_constraints(rsc);
apply_agent_constraints(GListPtr resources){	int lpc;	int lpc2;	slist_iter(		rsc, resource_t, resources, lpc,		crm_trace("Applying RA restrictions to %s", rsc->id);		slist_iter(			node, node_t, rsc->allowed_nodes, lpc2,						crm_trace("Checking if %s supports %s/%s (%s)",				  node->details->uname,				  rsc->agent->class, rsc->agent->type,				  rsc->agent->version);			if(has_agent(node, rsc->agent) == FALSE) {				/* remove node from contention */				crm_trace("Marking node %s unavailable for %s",					  node->details->uname, rsc->id);				node->weight = -1.0;				node->fixed = TRUE;			}			if(node->fixed && node->weight < 0) {				/* the structure of the list will have changed				 * lpc2-- might be sufficient				 */				crm_debug("Removing node %s from %s",					  node->details->uname, rsc->id);				lpc2 = -1;				rsc->allowed_nodes = g_list_remove(					rsc->allowed_nodes, node);				crm_free(node);			}						)		);	crm_trace("Finished applying RA restrictions");	return TRUE;}