send_ipc_request( crm_ch, options, data, on_node, destination, CRM_SYSTEM_TENGINE, NULL, NULL);
initiate_action(action_t *action) {	gboolean ret = FALSE;	xmlNodePtr options = NULL;	xmlNodePtr data    = NULL;	const char *on_node   = NULL;	const char *id        = NULL;	const char *task      = NULL;	const char *timeout   = NULL;	const char *destination = NULL;	#ifndef TESTING	xmlNodePtr rsc_op  = NULL;#endif	on_node  = xmlGetProp(action->xml, XML_LRM_ATTR_TARGET);	id       = xmlGetProp(action->xml, XML_ATTR_ID);	task     = xmlGetProp(action->xml, XML_LRM_ATTR_TASK);	timeout  = xmlGetProp(action->xml, XML_ATTR_TIMEOUT);	if(id == NULL || strlen(id) == 0	   || task == NULL || strlen(task) == 0) {		/* error */		crm_err("Failed on corrupted command: %s (id=%s) %s",			action->xml->name, crm_str(id), crm_str(task));	} else if(action->type == action_type_pseudo){		crm_info("Executing pseudo-event (%d): "			 "%s on %s", action->id, task, on_node);				action->complete = TRUE;		process_trigger(action->id);		ret = TRUE;				} else if(on_node == NULL || strlen(on_node) == 0) {		/* error */		crm_err("Failed on corrupted command: %s (id=%s) %s on %s",			action->xml->name, crm_str(id),			crm_str(task), crm_str(on_node));				} else if(action->type == action_type_crm){		/*		  <crm_msg op=XML_LRM_ATTR_TASK to=XML_RES_ATTR_TARGET>		*/		crm_info("Executing crm-event (%s): %s on %s",			 id, task, on_node);#ifndef TESTING		data = NULL;		action->complete = TRUE;		destination = CRM_SYSTEM_CRMD;		options = create_xml_node(NULL, XML_TAG_OPTIONS);		set_xml_property_copy(options, XML_ATTR_OP, task);#endif					ret = TRUE;	} else if(action->type == action_type_rsc){		crm_info("Executing rsc-op (%s): %s %s on %s",			 id, task,			 xmlGetProp(action->xml->children, XML_ATTR_ID),			 on_node);		/* let everyone know this was invoked */		do_update_cib(action->xml, -1);#ifndef TESTING		/*		  <msg_data>		  <rsc_op id="operation number" on_node="" task="">		  <resource>...</resource>		*/		data    = create_xml_node(NULL, XML_MSG_TAG_DATA);		rsc_op  = create_xml_node(data, XML_GRAPH_TAG_RSC_OP);		options = create_xml_node(NULL, XML_TAG_OPTIONS);		set_xml_property_copy(options, XML_ATTR_OP, XML_GRAPH_TAG_RSC_OP);				set_xml_property_copy(rsc_op, XML_ATTR_ID, id);		set_xml_property_copy(rsc_op, XML_LRM_ATTR_TASK, task);		set_xml_property_copy(rsc_op, XML_LRM_ATTR_TARGET, on_node);					add_node_copy(rsc_op, action->xml->children);		destination = CRM_SYSTEM_LRMD;#endif					ret = TRUE;				} else {		crm_err("Failed on unsupported command type: "			"%s, %s (id=%s) on %s",			action->xml->name, task, id, on_node);	}	if(ret && options != NULL) {		char *counter = crm_itoa(transition_counter);		set_xml_property_copy(			options, "transition_id", crm_str(counter));		crm_free(counter);		crm_xml_debug(options, "Performing");		if(data != NULL) {			crm_xml_debug(data, "Performing");		}#ifdef MSG_LOG		if(msg_te_strm != NULL) {			char *message = dump_xml_formatted(data);			char *ops = dump_xml_formatted(options);			fprintf(msg_te_strm, "[Action]\t%s\n%s\n",				crm_str(ops), crm_str(message));			fflush(msg_te_strm);			crm_free(message);			crm_free(ops);		}#endif		send_ipc_request(			crm_ch, options, data, on_node,			destination, CRM_SYSTEM_TENGINE, NULL, NULL);		if(action->timeout > 0) {			crm_debug("Setting timer for action %d",action->id);			start_te_timer(action->timer);		}	}		free_xml(options);	free_xml(data);		return ret;}