xmlNodePtr data = do_lrm_startup_query(); xmlNodePtr command, iter, answer;  command = create_xml_node(NULL, "status"); iter = create_xml_node(command, "node_state"); set_xml_property_copy(iter, XML_ATTR_ID, fsa_our_uname); iter = create_xml_node(iter, "lrm");  command = create_cib_fragment(command, "status");  process_cib_request(CRM_OPERATION_DELETE, NULL, command);  add_node_copy(iter, data); answer = process_cib_request(CRM_OPERATION_UPDATE, NULL, command);  free_xml(command);    if(AM_I_DC) {  xmlNodePtr new_options = set_xml_attr(NULL, XML_TAG_OPTIONS, XML_ATTR_FILTER_TYPE, "status", TRUE);  free_xml(answer); answer = process_cib_request(CRM_OPERATION_BUMP, new_options, NULL);  send_request(NULL, answer, CRM_OPERATION_REPLACE, NULL, CRM_SYSTEM_CRMD);  free_xml(new_options);   } else { send_request(NULL, answer, CRM_OPERATION_UPDATE, NULL, CRM_SYSTEM_DCIB);  } free_xml(answer);
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;	FNIN();	if(data != NULL)		cib_msg = (xmlNodePtr)data;		if(action & A_CIB_INVOKE) {		set_xml_property_copy(cib_msg, XML_ATTR_SYSTO, "cib");		xmlNodePtr answer = process_cib_message(cib_msg, TRUE);		if(relay_message(answer, TRUE) == FALSE) {			cl_log(LOG_ERR, "Confused what to do with cib result");			xml_message_debug(answer, "Couldnt route: ");		}		// check the answer, see if we are interested in it also#if 0		if(interested in reply) {			put_message(answer);			FNRET(I_REQUEST);		}		#endif		free_xml(answer);		/* experimental */	} else if(action & A_CIB_INVOKE_LOCAL) {		xmlNodePtr answer = process_cib_message(cib_msg, TRUE);		put_message(answer);		FNRET(I_REQUEST);	} else if(action & A_CIB_BUMPGEN) {   		// check if the response was ok before next bit		const char *section = get_xml_attr(cib_msg, XML_TAG_OPTIONS,						   XML_ATTR_FILTER_TYPE, FALSE);				/* set the section so that we dont always send the		 * whole thing		 */		xmlNodePtr new_options =			set_xml_attr(NULL, XML_TAG_OPTIONS,				     XML_ATTR_FILTER_TYPE, section, TRUE);				xmlNodePtr answer = process_cib_request(CRM_OPERATION_BUMP,							new_options, NULL);		send_request(NULL, answer, CRM_OPERATION_STORE,			     NULL, CRM_SYSTEM_CRMD);		free_xml(answer);		free_xml(new_options);  	} else if(action & A_UPDATE_NODESTATUS) {		/* build our status */		/* save to message list CIB */		/* return I_MESSAGE */			} else {		cl_log(LOG_ERR, "Unexpected action %s",		       fsa_action2string(action));	}			FNRET(I_NULL);}