add_res = CIB_ERROR_CORRUPT; 
add_res = CIBRES_CORRUPT; 
addResource(xmlNodePtr cib, cibResource *xml_node){	int add_res = 0;	const char * id = NULL;	const char * type = NULL;	xmlNodePtr new_parent = NULL;	FNIN();		id = xmlGetProp(xml_node, XML_ATTR_ID);	type = xmlGetProp(xml_node, XML_CIB_ATTR_RESTYPE);		if (id == NULL || strlen(id) < 1)		add_res = CIB_ERROR_MISSING_ID;	else if (findResource(cib, ID(xml_node)) != NULL)		add_res = CIB_ERROR_EXISTS;	else if (type == NULL || strlen(type) < 1)		add_res = CIB_ERROR_MISSING_TYPE;	else {		new_parent = get_object_root(XML_CIB_TAG_RESOURCES, cib);		if(new_parent == NULL) {			// create it?			add_res = CIB_ERROR_CORRUPT;		} else {			add_node_copy(new_parent, xml_node);		}	}	FNRET(add_res);}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/a02ed4e20b43aec506bc1ff32e5f094cc504002b/cibprimatives.c/clean/crm/cib/cibprimatives.c