print_xml_formatted(cib_msg, "[CIB b4]");
crm_xml_devel(cib_msg, "[CIB b4]");
do_cib_invoke(long long action,	      enum crmd_fsa_cause cause,	      enum crmd_fsa_state cur_state,	      enum crmd_fsa_input current_input,	      void *data){	xmlNodePtr cib_msg = NULL;	xmlNodePtr answer = NULL;	xmlNodePtr new_options = NULL;	const char *section = NULL;	enum crmd_fsa_input result = I_NULL;	if(data != NULL) {		cib_msg = (xmlNodePtr)data;	}			if(action & A_CIB_INVOKE || action & A_CIB_INVOKE_LOCAL) {/*		gboolean is_update   = FALSE; */		xmlNodePtr options   = find_xml_node(cib_msg, XML_TAG_OPTIONS);		const char *sys_from = xmlGetProp(cib_msg, XML_ATTR_SYSFROM);		const char *op       = xmlGetProp(options, XML_ATTR_OP);				print_xml_formatted(cib_msg, "[CIB b4]");		if(cib_msg == NULL) {			crm_err("No message for CIB command");			return I_NULL; /* I_ERROR */		} else if(op == NULL) {			print_xml_formatted(cib_msg, "Invalid CIB Message");			return I_NULL; /* I_ERROR */		}		set_xml_property_copy(cib_msg, XML_ATTR_SYSTO, "cib");		answer = process_cib_message(cib_msg, TRUE);		if(action & A_CIB_INVOKE) {			if(AM_I_DC == FALSE) {				if(relay_message(answer, TRUE) == FALSE) {					crm_err("Confused what to do with cib result");					print_xml_formatted(answer, "Couldnt route: ");					result = I_ERROR;				}							} else if(strcmp(op, CRM_OP_CREATE) == 0			   || strcmp(op, CRM_OP_UPDATE) == 0			   || strcmp(op, CRM_OP_DELETE) == 0			   || strcmp(op, CRM_OP_REPLACE) == 0			   || strcmp(op, CRM_OP_WELCOME) == 0			   || strcmp(op, CRM_OP_SHUTDOWN_REQ) == 0) {				result = I_CIB_UPDATE;								} else if(strcmp(op, CRM_OP_ERASE) == 0) {				/* regenerate everyone's state and our node entry */				result = I_ELECTION_DC;				}						/* the TENGINE will get CC'd by other means. */			if(AM_I_DC			   && sys_from != NULL			   && safe_str_neq(sys_from, CRM_SYSTEM_TENGINE) 			   && safe_str_neq(sys_from, CRM_SYSTEM_CRMD)			   && safe_str_neq(sys_from, CRM_SYSTEM_DC)			   && relay_message(answer, TRUE) == FALSE) {				crm_err("Confused what to do with cib result");				print_xml_formatted(answer, "Couldnt route: ");				result = I_ERROR;							}			/* 		} else { *//* 			put_message(answer); *//* 			return I_REQUEST; */					}		print_xml_formatted(cib_msg, "[CIB after]");		return result;	} else if(action & A_CIB_BUMPGEN) {/*		xmlNodePtr options   = find_xml_node(cib_msg, XML_TAG_OPTIONS); *//*		const char *op       = xmlGetProp(options, XML_ATTR_OP); */		if(AM_I_DC == FALSE) {			return I_NULL;		} 		/* check if the response was ok before next bit *//*		if(safe_str_neq(op, CRM_OP_WELCOME)) { */			/* set the section so that we dont always send the			 * whole thing			 */		section = get_xml_attr(			cib_msg, XML_TAG_OPTIONS,			XML_ATTR_FILTER_TYPE, FALSE);/*		} */				if(section != NULL) {			new_options = set_xml_attr(				NULL, XML_TAG_OPTIONS, XML_ATTR_FILTER_TYPE,				section, TRUE);		}				answer = process_cib_request(			CRM_OP_BUMP, new_options, NULL);		free_xml(new_options);		if(answer == NULL) {			crm_err("Result of BUMP in %s was NULL",			       __FUNCTION__);			return I_FAIL;		}		send_request(NULL, answer, CRM_OP_REPLACE,			     NULL, CRM_SYSTEM_CRMD, NULL);				free_xml(answer);	} else {		crm_err("Unexpected action %s in %s",		       fsa_action2string(action), __FUNCTION__);	}			return I_NULL;}