lh_resource->color = create_color(colors, lh_resource, NULL);
color_t *new_color = create_color(colors, lh_resource, NULL); assign_color(lh_resource, new_color);
color_resource(resource_t *lh_resource, GListPtr *colors, GListPtr resources){	crm_debug_action(print_resource("Coloring", lh_resource, FALSE));		if(lh_resource->provisional == FALSE) {		// already processed this resource		return;	}		lh_resource->rsc_cons = g_list_sort(		lh_resource->rsc_cons, sort_cons_strength);	crm_debug_action(		print_resource("Pre-processing", lh_resource, FALSE));	//------ Pre-processing	rsc_preproc(lh_resource, colors, resources);		/* avoid looping through lists when we know this resource	 * cant be started	 */	if( choose_color(lh_resource) ) {		crm_verbose("Colored resource %s with color %d",			    lh_resource->id, lh_resource->color->id);			} else if(lh_resource->allowed_nodes != NULL) {		// filter out nodes with a negative weight		filter_nodes(lh_resource);		lh_resource->color = create_color(colors, lh_resource, NULL);	}		if(lh_resource->color == NULL) {		crm_err("Could not color resource %s", lh_resource->id);		print_resource("ERROR: No color", lh_resource, FALSE);		lh_resource->color = no_color;	}	lh_resource->provisional = FALSE;	crm_debug_action(		print_resource("Post-processing", lh_resource, FALSE));	//------ Post-processing	rsc_postproc(lh_resource, colors, resources);		crm_debug_action(print_resource("Colored", lh_resource, FALSE));}