this_admin_epoche = atoi(value?value:"0");
this_admin_epoch = atoi(value?value:"0");
apply_cib_diff(crm_data_t *old, crm_data_t *diff, crm_data_t **new){	gboolean result = TRUE;	const char *value = NULL;	int this_updates = 0;	int this_epoche  = 0;	int this_admin_epoche = 0;	int diff_add_updates = 0;	int diff_add_epoche  = 0;	int diff_add_admin_epoche = 0;	int diff_del_updates = 0;	int diff_del_epoche  = 0;	int diff_del_admin_epoche = 0;	CRM_DEV_ASSERT(diff != NULL);	CRM_DEV_ASSERT(old != NULL);		value = crm_element_value(old, XML_ATTR_GENERATION_ADMIN);	this_admin_epoche = atoi(value?value:"0");	crm_debug_3("%s=%d (%s)", XML_ATTR_GENERATION_ADMIN,		  this_admin_epoche, value);		value = crm_element_value(old, XML_ATTR_GENERATION);	this_epoche = atoi(value?value:"0");	crm_debug_3("%s=%d (%s)", XML_ATTR_GENERATION, this_epoche, value);		value = crm_element_value(old, XML_ATTR_NUMUPDATES);	this_updates = atoi(value?value:"0");	crm_debug_3("%s=%d (%s)", XML_ATTR_NUMUPDATES, this_updates, value);		cib_diff_version_details(		diff,		&diff_add_admin_epoche, &diff_add_epoche, &diff_add_updates, 		&diff_del_admin_epoche, &diff_del_epoche, &diff_del_updates);	value = NULL;	if(result && diff_del_admin_epoche != this_admin_epoche) {		value = XML_ATTR_GENERATION_ADMIN;		result = FALSE;		crm_debug_3("%s=%d", value, diff_del_admin_epoche);	} else if(result && diff_del_epoche != this_epoche) {		value = XML_ATTR_GENERATION;		result = FALSE;		crm_debug_3("%s=%d", value, diff_del_epoche);	} else if(result && diff_del_updates != this_updates) {		value = XML_ATTR_NUMUPDATES;		result = FALSE;		crm_debug_3("%s=%d", value, diff_del_updates);	}	if(result) {		int len = 0;		crm_data_t *tmp = NULL;		crm_data_t *diff_copy = copy_xml(diff);				tmp = find_xml_node(diff_copy, "diff-removed", TRUE);		if(tmp != NULL) {			len = tmp->nfields;			cl_msg_remove(tmp, XML_ATTR_GENERATION_ADMIN);			cl_msg_remove(tmp, XML_ATTR_GENERATION);			cl_msg_remove(tmp, XML_ATTR_NUMUPDATES);			CRM_DEV_ASSERT(tmp->nfields == len - 3);		}				tmp = find_xml_node(diff_copy, "diff-added", TRUE);		if(tmp != NULL) {			len = tmp->nfields;			cl_msg_remove(tmp, XML_ATTR_GENERATION_ADMIN);			cl_msg_remove(tmp, XML_ATTR_GENERATION);			cl_msg_remove(tmp, XML_ATTR_NUMUPDATES);			CRM_DEV_ASSERT(tmp->nfields == len - 3);		}				result = apply_xml_diff(old, diff_copy, new);		free_xml(diff_copy);			} else {		crm_err("target and diff %s values didnt match", value);	}			return result;}