resource_t *rsc_lh = cons->rsc_lh;
rsc_lh = cons->rsc_lh;
apply_node_constraints(GSListPtr constraints, 		       GSListPtr resources,		       GSListPtr nodes){	cl_log(LOG_DEBUG, "Applying constraints... %s", __FUNCTION__);	int lpc = 0;	for(lpc = 0; lpc < g_slist_length(constraints); lpc++) {		rsc_constraint_t *cons = (rsc_constraint_t *)			g_slist_nth_data(constraints, lpc);				cl_log(LOG_DEBUG, "Processing constraint %d", lpc);		// take "lifetime" into account		if(cons == NULL) {			cl_log(LOG_ERR, "Constraint (%d) is NULL", lpc); 				continue;					} else if(is_active(cons) == FALSE) {			cl_log(LOG_INFO, "Constraint (%d) is not active", lpc); 				// warning			continue;		}    		resource_t *rsc_lh = cons->rsc_lh;		if(rsc_lh == NULL) {			cl_log(LOG_ERR, "LHS of rsc_to_node (%s) is NULL", cons->id); 				continue;		}		GSListPtr rsc_cons_list = cons->rsc_lh->constraints;		rsc_lh->constraints = g_slist_append(rsc_cons_list, cons);		if(cons->type == rsc_to_rsc) {			// nothing 			cl_log(LOG_DEBUG, "nothing to do");			continue;					} else if(cons->type == rsc_to_node) {			if(cons->node_rh == NULL) {				cl_log(LOG_ERR,				       "RHS of rsc_to_node (%s) is NULL",				       cons->id);				continue;			} else if(cons->node_rh->fixed) {				// warning				cl_log(LOG_WARNING,				       "Constraint %s is irrelevant as the"				       " weight of node %s is fixed as %f.",				       cons->id,				       cons->node_rh->id,				       cons->node_rh->weight);			} else {				node_t *node_rh =					pe_find_node(cons->rsc_lh->allowed_nodes,						     cons->node_rh->id);								cl_log(LOG_DEBUG,				       "Constraint %s: node %s weight %s %f.",				       cons->id,				       cons->node_rh->id,				       modifier2text(cons->modifier),				       cons->node_rh->weight);				switch(cons->modifier) {					case set:						node_rh->weight = cons->weight;						node_rh->fixed = TRUE;						break;					case inc:						node_rh->weight += cons->weight;						break;					case dec:						node_rh->weight -= cons->weight;						break;					case modifier_none:						// warning						break;				  				}			}			/* dont add it to the resource,			 *  the information is in the resouce's node list			 */		} else {			// error		}	}	return TRUE;	}