g_slist_append(node->details->running_rsc, rsc_lh);
g_list_append(node->details->running_rsc, rsc_lh);
process_node_lrm_state(node_t *node, xmlNodePtr lrm_state,		       GSListPtr rsc_list, GSListPtr nodes,		       GSListPtr *node_constraints){	while(lrm_state != NULL) {		const char *rsc_id    = xmlGetProp(			lrm_state, XML_ATTR_ID);		const char *node_id   = xmlGetProp(			lrm_state, XML_LRM_ATTR_TARGET);		const char *rsc_state = xmlGetProp(			lrm_state, XML_LRM_ATTR_STATE);				resource_t *rsc_lh = pe_find_resource(rsc_list, rsc_id);		crm_verbose("[%s] Processing %s on %s (%s)",		       lrm_state->name, rsc_id, node_id, rsc_state);		lrm_state = lrm_state->next;		if(rsc_lh == NULL) {			crm_err("Could not find a match for resource"				" %s in %s's status section",				rsc_id, node_id);			continue;		}				crm_verbose("Setting cur_node = %s for rsc = %s",			  node->details->id, rsc_lh->id);		if(rsc_lh->cur_node != NULL) {			crm_err(			       "Resource %s running on multiple nodes %s & %s",			       rsc_lh->id,			       rsc_lh->cur_node->details->id,			       node->details->id);			// TODO: some recovery action!!			// like force a stop on the first node?			continue;		}				rsc_lh->cur_node = node;		node->details->running_rsc =			g_slist_append(node->details->running_rsc, rsc_lh);		if((safe_str_eq(rsc_state, "starting"))		   || (safe_str_eq(rsc_state, "started"))) {			node_t *node_rh;			rsc_to_node_t *new_cons =				crm_malloc(sizeof(rsc_to_node_t));			new_cons->id = crm_strdup("create_me"); // genereate one			new_cons->weight = 100.0;			new_cons->modifier = inc;						new_cons->rsc_lh = rsc_lh;			node_rh = pe_find_node(nodes, node_id);						new_cons->node_list_rh = g_slist_append(NULL, node_rh);								*node_constraints =				g_slist_append(*node_constraints, new_cons);						crm_debug_action(print_rsc_to_node(					      "Added", new_cons, FALSE));					} else if(safe_str_eq(rsc_state, "stop_fail")) {			// do soemthing		} // else no preference	}	return TRUE;}