if(match != NULL) { GListPtr match_L = match_attrs( match, node_list, FALSE); 
GListPtr match_L = match_attrs( attr, op, value, type, node_list);  if(first_expr) { new_con->node_list_rh =	node_list_dup( match_L, FALSE); first_expr = FALSE; continue; } 
unpack_rsc_location(xmlNodePtr xml_obj, GListPtr rsc_list, GListPtr node_list,		    GListPtr *node_constraints){/*  <constraints>     <rsc_location rsc="Filesystem-whatever-1" timestamp="..." lifetime="...">     	<rule score="+50.0" result="can">       		<node_expression match="san" not_match="uname:node2"/>       		<!-- and --><node_expression match="arch:i686" />	</rule>     	<rule score="+500.0">       		<node_expression match="cpu:50GHz" />	</rule>     	<rule result="cannot">       		<node_expression not_match="san"/>	</rule>...   Translation:   Further translation:       */	xmlNodePtr rules    = xml_obj->children;	const char *id_lh   = xmlGetProp(xml_obj, "rsc");	const char *id      = xmlGetProp(xml_obj, XML_ATTR_ID);	resource_t *rsc_lh = pe_find_resource(rsc_list, id_lh);	if(rsc_lh == NULL) {		crm_err("No resource (con=%s, rsc=%s)",		       id, id_lh);		return FALSE;	}				if(rules == NULL) {		crm_err("no rules for constraint %s", id);	}		while(rules != NULL) {		gboolean first_expr = TRUE;		gboolean   can_run  = FALSE;		gboolean   do_and   = TRUE;		xmlNodePtr rule     = rules;		xmlNodePtr expr     = rule->children;		const char *rule_id = xmlGetProp(rule, XML_ATTR_ID);		const char *score   = xmlGetProp(rule, "score");		const char *result  = xmlGetProp(rule, "result");		const char *boolean = xmlGetProp(rule, "boolean");		float score_f       = atof(score?score:"0.0");		rsc_to_node_t *new_con = NULL;		if(safe_str_eq(boolean, "or")) {			do_and = FALSE;		}		rules = rules->next;		if(result == NULL || (safe_str_eq(result, "can"))) {			can_run = TRUE;		}		new_con = rsc2node_new(rule_id, rsc_lh, score_f,				       can_run, NULL, node_constraints);		if(new_con == NULL) {			crm_err("couldnt create constraint %s", rule_id);			continue;		}				/* feels like a hack */		if(expr == NULL && can_run) {			new_con->node_list_rh = node_list_dup(node_list,FALSE);		}				while(expr != NULL) {			const char *match     = xmlGetProp(expr, "match");			const char *not_match = xmlGetProp(expr, "not_match");			expr = expr->next;			if(match != NULL) {				GListPtr match_L = match_attrs(					match, node_list, FALSE);				if(first_expr) {					new_con->node_list_rh =	match_L;					first_expr = FALSE;					continue;				}				if(do_and) {					crm_trace("do_and");										new_con->node_list_rh = node_list_and(						new_con->node_list_rh,						match_L, FALSE);				} else {					crm_trace("do_or");					new_con->node_list_rh = node_list_or(						new_con->node_list_rh,						match_L, FALSE);				}				pe_free_shallow(match_L);			}						if(not_match != NULL) {				GListPtr not_match_L = match_attrs(					not_match, node_list, TRUE);				if(first_expr) {					new_con->node_list_rh =	not_match_L;					first_expr = FALSE;					continue;				}				if(do_and) {					new_con->node_list_rh = node_list_and(						new_con->node_list_rh,						not_match_L, FALSE);				} else {					new_con->node_list_rh = node_list_or(						new_con->node_list_rh,						not_match_L, FALSE);				}				pe_free_shallow(not_match_L);			}			}				if(new_con->node_list_rh == NULL) {			crm_warn("No matching nodes for constraint/rule %s/%s",				 id, rule->name);		}		crm_debug_action(print_rsc_to_node("Added", new_con, FALSE));	}	return TRUE;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/68c2573f186a540517c17f9932a3816b84039ca5/unpack.c/buggy/crm/pengine/unpack.c