if(cons->can == FALSE) { node_rh->weight = -1; } else { node_rh->weight += cons->weight;
if(old_weight >= 0) { if(cons->weight >= 0 && node_rh->weight < 0) { node_rh->weight = INFINITY; }  } else if(cons->weight <= 0 && node_rh->weight > 0) { node_rh->weight = -INFINITY; }   if(node_rh->weight >= INFINITY) { node_rh->weight = INFINITY; node_rh->fixed = TRUE;  } else if(node_rh->weight <= -INFINITY) { node_rh->weight = -INFINITY; node_rh->fixed = TRUE;
native_update_node_weight(resource_t *rsc, rsc_to_node_t *cons,			  const char *id, GListPtr nodes){	node_t *node_rh = NULL;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);	node_rh = pe_find_node(native_data->allowed_nodes, id);	if(node_rh == NULL) {		crm_err("Node not found - cant update");		return;	}	if(node_rh->fixed) {		/* warning */		crm_debug("Constraint %s is irrelevant as the"			 " weight of node %s is fixed as %f.",			 cons->id,			 node_rh->details->uname,			 node_rh->weight);		return;	}		crm_verbose("Constraint %s (%s): node %s weight %f.",		    cons->id,		    cons->can?"can":"cannot",		    node_rh->details->uname,		    node_rh->weight);	if(cons->can == FALSE) {		node_rh->weight = -1;	} else {		node_rh->weight += cons->weight;	}	if(node_rh->weight < 0) {		node_rh->fixed = TRUE;	}	crm_devel_action(print_node("Updated", node_rh, FALSE));	return;}