discard  = xmlGetProp(xml_action, "discard"); 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"); 
discard  = xmlGetProp(xml_action, XML_LRM_ATTR_DISCARD); on_node  = xmlGetProp(xml_action, XML_LRM_ATTR_TARGET); id       = xmlGetProp(xml_action, XML_ATTR_ID); runnable = xmlGetProp(xml_action, XML_LRM_ATTR_RUNNABLE); optional = xmlGetProp(xml_action, XML_LRM_ATTR_OPTIONAL); task     = xmlGetProp(xml_action, XML_LRM_ATTR_TASK); 
initiate_action(action_list_t *list) {	gboolean is_optional  = TRUE;	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;	const char *discard   = 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;		}				discard  = xmlGetProp(xml_action, "discard");		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");				if(safe_str_eq(discard, "true")) {			cl_log(LOG_INFO,			       "Skipping discarded rsc-op (%s): %s %s on %s",			       id, task,			       xmlGetProp(xml_action->children, "id"),			       on_node);			continue;		}		if(safe_str_neq(optional, "true")) {			is_optional = FALSE;		}				list->force = list->force || !is_optional;		/*		cl_log(LOG_DEBUG,		       "Processing action %s (id=%s) on %s",		       task, id, on_node);		*/				if(list->force && is_optional) {			cl_log(LOG_INFO,			       "Forcing execution of otherwise optional task "			       "due to a dependancy on a previous action");		}				if(list->force == FALSE && is_optional) {			if(safe_str_eq(xml_action->name, "rsc_op")){				cl_log(LOG_INFO,				       "Skipping optional rsc-op (%s):"				       " %s %s on %s",				       id, task,				       xmlGetProp(xml_action->children, "id"),				       on_node);			} else {				cl_log(LOG_INFO,				       "Skipping optional command"				       " %s (id=%s) on %s",				       task, id, on_node);			}					} else if(safe_str_eq(runnable, "false")) {			cl_log(LOG_ERR,			       "Terminated transition on un-runnable command:"			       " %s (id=%s) on %s",			       task, id, on_node);			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,			       "Failed on corrupted command: %s (id=%s) on %s",			       task, id, on_node);						return FALSE;					} else if(safe_str_eq(xml_action->name, "pseduo_event")){			if(safe_str_eq(task, "stonith")){				cl_log(LOG_INFO,				       "Executing %s (%s) of node %s",				       task, id, on_node);/*  translate this into a stonith op by deisgnated node  may need the CIB to determine who is running the stonith resource    for this node  more liekly, have the pengine find and supply that info */			} else {				cl_log(LOG_ERR,				       "Failed on unsupported %s: "				       "%s (id=%s) on %s",				       xml_action->name, task, id, on_node);								return FALSE;			}								} else if(safe_str_eq(xml_action->name, "crm_event")){			/*			  <crm_msg op="task" to="on_node">			*/			cl_log(LOG_INFO,			       "Executing crm-event (%s): %s on %s",			       id, task, on_node);#ifndef TESTING			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;#endif					} else if(safe_str_eq(xml_action->name, "rsc_op")){			cl_log(LOG_INFO,			       "Executing rsc-op (%s): %s %s on %s",			       id, task,			       xmlGetProp(xml_action->children, "id"),			       on_node);#ifndef TESTING			/*			  <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;#endif								} else {			// error			cl_log(LOG_ERR,			       "Failed on unsupported command type: "			       "%s, %s (id=%s) on %s",			       xml_action->name, task, id, on_node);			return FALSE;		}	}		return FALSE;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/ef58d3b85babb3ee720d7d6daa4e29d17c0d95cb/tengine.c/buggy/crm/tengine/tengine.c