const char *rsc_id    = xmlGetProp(lrm_state, "id"); const char *node_id   = xmlGetProp(lrm_state, "op_node"); const char *rsc_state = xmlGetProp(lrm_state, "state");
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);
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, "id");		const char *node_id   = xmlGetProp(lrm_state, "op_node");		const char *rsc_state = xmlGetProp(lrm_state, "state");		resource_t *rsc_lh = pe_find_resource(rsc_list, rsc_id);		pdebug("[%s] Processing %s on %s (%s)",		       lrm_state->name, rsc_id, node_id, rsc_state);		lrm_state = lrm_state->next;		if(rsc_lh == NULL) {			cl_log(LOG_ERR,			       "Could not find a match for resource"			       " %s in %s's status section",			       rsc_id, node_id);			continue;		}				pdebug("Setting cur_node = %s for rsc = %s",			  node->details->id, rsc_lh->id);				rsc_lh->cur_node = node;		node->details->running_rsc =			g_slist_append(node->details->running_rsc, rsc_lh);		/* it is runnable, but depends on a stonith op 		if(safe_val3(FALSE, node, details, unclean)) {			rsc_lh->runnable = FALSE;		}		*/				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);						pdebug_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;}