xmlNodePtr saved_cib = get_the_CIB();
crm_data_t *saved_cib = get_the_CIB();
activateCibXml(xmlNodePtr new_cib, const char *filename){	int error_code = 0;	xmlNodePtr saved_cib = get_the_CIB();	const char *filename_bak = CIB_BACKUP; /* calculate */	if (initializeCib(new_cib) == TRUE) {		int res = moveFile(filename, filename_bak, FALSE, NULL);			if (res  < 0) {			crm_info("Could not make backup of the current Cib "				 "(code: %d)... aborting update.", res);			error_code = -1;		} else {			crm_info("Writing CIB out to %s", CIB_FILENAME);			res = write_xml_file(new_cib, CIB_FILENAME);#ifdef DEVEL_CIB_COPY			write_xml_file(new_cib, DEVEL_DIR"/cib.xml");#endif			if (res < 0) {				/* assume 0 is good */				if (moveFile(filename_bak,					     filename,					     FALSE,					     NULL) < -1) {					crm_crit("Could not restore the "						 "backup of the current Cib "						 "(code: %d)... panic!",						 res);					error_code = -2;					/* should probably exit here  */				} else if (initializeCib(saved_cib) == FALSE) {					/* oh we are so dead  */					crm_crit("Could not re-initialize "						 "with the old CIB.  "						 "Everything is about to go "						 "pear shaped");					error_code = -3;				} else {					crm_crit("Update of Cib failed "						 "(code: %d)... reverted to "						 "last known valid version",						 res);										error_code = -4;				}			}		}	}	else	{		crm_info("Ignoring invalid or NULL Cib");		error_code = -5;	}	/* Make sure memory is cleaned up appropriately */	if (error_code != 0) {		crm_trace("Freeing new CIB %p", new_cib);		free_xml(new_cib);	} else {		crm_trace("Freeing saved CIB %p", saved_cib);		free_xml(saved_cib);	}	return error_code;    }