if(safe_str_eq(optional, "true")) { cl_log(LOG_INFO, "Skipping optional command");
*/
initiate_action(action_list_t *list) {	xmlNodePtr xml_action = NULL;	const char *on_node   = NULL;	const char *id        = NULL;	const char *runnable  = NULL;	const char *optional  = NULL;	const char *task      = NULL;	while(TRUE) {				list->index++;		xml_action = g_slist_nth_data(list->actions, list->index);				if(xml_action == NULL) {			cl_log(LOG_INFO, "No tasks left on this list");			list->index = list->index_max + 1;						return TRUE;		}						on_node  = xmlGetProp(xml_action, "on_node");		id       = xmlGetProp(xml_action, "id");		runnable = xmlGetProp(xml_action, "runnable");		optional = xmlGetProp(xml_action, "optional");		task     = xmlGetProp(xml_action, "task");		cl_log(LOG_INFO,		       "Invoking action %s (id=%s) on %s",		       task, id, on_node);		if(safe_str_eq(optional, "true")) {			cl_log(LOG_INFO, "Skipping optional command");				} else if(safe_str_eq(runnable, "false")) {			cl_log(LOG_ERR, "Skipping un-runnable command");			return FALSE;					} else if(id == NULL || strlen(id) == 0			  || on_node == NULL || strlen(on_node) == 0			  || task == NULL || strlen(task) == 0) {			// error			cl_log(LOG_ERR,			       "Command: \"%s (id=%s) on %s\" was corrupted.",			       task, id, on_node);						return FALSE;			//	} else if(safe_str_eq(xml_action->name, "pseduo_event")){					} else if(safe_str_eq(xml_action->name, "crm_event")){			/*			  <crm_msg op="task" to="on_node">			*/			xmlNodePtr options = create_xml_node(NULL, "options");			set_xml_property_copy(options, XML_ATTR_OP, task);						send_ipc_request(crm_ch, options, NULL,					 on_node, "crmd", "tengine",					 NULL, NULL);						free_xml(options);			return TRUE;					} else if(safe_str_eq(xml_action->name, "rsc_op")){			/*			  <msg_data>			  <rsc_op id="operation number" on_node="" task="">			  <resource>...</resource>			*/			xmlNodePtr options = create_xml_node(NULL, "options");			xmlNodePtr data = create_xml_node(NULL, "msg_data");			xmlNodePtr rsc_op = create_xml_node(data, "rsc_op");						set_xml_property_copy(options, XML_ATTR_OP, "rsc_op");						set_xml_property_copy(rsc_op, "id", id);			set_xml_property_copy(rsc_op, "task", task);			set_xml_property_copy(rsc_op, "on_node", on_node);						add_node_copy(rsc_op, xml_action->children);						send_ipc_request(crm_ch, options, data,					 on_node, "lrmd", "tengine",					 NULL, NULL);						free_xml(options);			free_xml(data);			return TRUE;					} else {			// error			cl_log(LOG_ERR, "Action %s is not (yet?) supported",			       xml_action->name);					}	}		return FALSE;}