const char *strength = xmlGetProp(constraints, "strength"); 
const char *strength = xmlGetProp(xml_obj, "strength"); 
unpack_constraints(xmlNodePtr constraints) {	while(constraints != NULL) {		const char *id = xmlGetProp(constraints, "id");		if(id == NULL) {			// error			continue;		}		rsc_constraint_t *new_con =cl_malloc(sizeof(rsc_constraint_t));		rsc_constraint_t *inverted_con = NULL;		resource_t *rsc_lh = 		  pe_find_resource(rsc_list, 				   xmlGetProp(constraints, "rsc_id_1"));		new_con->id = cl_strdup(id);		if(safe_str_eq("rsc_to_rsc", constraints->name)) {			new_con->type = rsc_to_rsc;			const char *strength = xmlGetProp(constraints, "strength");			if(safe_str_eq(strength, "must")) {				new_con->strength = must;			} else if(safe_str_eq(strength, "should")) {				new_con->strength = should;			} else if(safe_str_eq(strength, "should_not")) {				new_con->strength = should_not;			} else if(safe_str_eq(strength, "must_not")) {				new_con->strength = must_not;			} else {				// error			}			const char *type = xmlGetProp(constraints, "type");			if(safe_str_eq(type, "ordering")) {				new_con->is_placement = FALSE;			} else if (safe_str_eq(type, "placement")) {				new_con->is_placement = TRUE;			} else {				// error			}      			new_con->node_rh = NULL;			resource_t *rsc_rh = pe_find_resource(rsc_list, xmlGetProp(constraints, "rsc_id_2"));			new_con->rsc_rh = rsc_rh;			inverted_con = invert_constraint(new_con);			g_slist_insert_sorted(cons_list, new_con, sort_cons_strength);		} else if(safe_str_eq("rsc_to_node", constraints->name)) {			new_con->type = rsc_to_node;			new_con->rsc_rh = NULL;			new_con->node_rh = pe_find_node(node_list, rsc_lh, 							xmlGetProp(constraints, "node_id"));			if(new_con->node_rh->fixed) {				// warning			} else {				const char *mod = xmlGetProp(constraints, "modifier");				const char *weight = xmlGetProp(constraints, "weight");				float weight_f = atof(weight);				new_con->weight = weight_f;					if(safe_str_eq(mod, "set")){					new_con->modifier = set;				} else if(safe_str_eq(mod, "inc")){					new_con->modifier = inc;				} else if(safe_str_eq(mod, "dec")){					new_con->modifier = dec;				} else {					// error				}				}			/* dont add it to the resource,			 *  the information is in the resouce's node list			 */		} else {			// error		}		g_slist_insert_sorted(cons_list, new_con, sort_cons_strength);		constraints = constraints->next;	}	return TRUE;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/db8433868c8c969b4872da3b0ab348b28883713b/pengine.c/buggy/crm/pengine/pengine.c