options = create_xml_node( 
xmlNodePtr options = create_xml_node( 
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;#ifndef TESTING	xmlNodePtr options = NULL;	xmlNodePtr data = NULL;	xmlNodePtr rsc_op = NULL;#endif		while(TRUE) {				list->index++;		xml_action = g_list_nth_data(list->actions, list->index);				if(xml_action == NULL) {			crm_info("No tasks left on this list");			list->index = list->index_max + 1;						return TRUE;		}				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);				if(safe_str_eq(discard, XML_BOOLEAN_TRUE)) {			crm_info("Skipping discarded rsc-op (%s): %s %s on %s",				 id, task,				 xmlGetProp(xml_action->children, XML_ATTR_ID),				 on_node);			continue;		}		if(safe_str_neq(optional, XML_BOOLEAN_TRUE)) {			is_optional = FALSE;		}				list->force = list->force || !is_optional;		crm_verbose("Processing action %s (id=%s) on %s",		       task, id, on_node);				if(list->force && is_optional) {			crm_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")){				crm_info("Skipping optional rsc-op (%s):"					 " %s %s on %s",					 id, task,					 xmlGetProp(xml_action->children,						    XML_ATTR_ID),				       on_node);			} else {				crm_info("Skipping optional command"					 " %s (id=%s) on %s",					 task, id, on_node);			}					} else if(safe_str_eq(runnable, XML_BOOLEAN_FALSE)) {			crm_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			crm_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")){				crm_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 {				crm_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=XML_LRM_ATTR_TASK to=XML_RES_ATTR_TARGET>			*/			crm_info("Executing crm-event (%s): %s on %s",				 id, task, on_node);#ifndef TESTING			options = create_xml_node(				NULL, XML_TAG_OPTIONS);			set_xml_property_copy(options, XML_ATTR_OP, task);						send_ipc_request(crm_ch, options, NULL,					 on_node, CRM_SYSTEM_CRMD, CRM_SYSTEM_TENGINE,					 NULL, NULL);						free_xml(options);			return TRUE;#endif					} else if(safe_str_eq(xml_action->name, "rsc_op")){			crm_info("Executing rsc-op (%s): %s %s on %s",				 id, task,				 xmlGetProp(xml_action->children, XML_ATTR_ID),				 on_node);#ifndef TESTING			/*			  <msg_data>			  <rsc_op id="operation number" on_node="" task="">			  <resource>...</resource>			*/			options = create_xml_node(				NULL, XML_TAG_OPTIONS);			data = create_xml_node(NULL, "msg_data");			rsc_op = create_xml_node(data, "rsc_op");						set_xml_property_copy(options, XML_ATTR_OP, "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, xml_action->children);						send_ipc_request(crm_ch, options, data,					 on_node, "lrmd", CRM_SYSTEM_TENGINE,					 NULL, NULL);						free_xml(options);			free_xml(data);			return TRUE;#endif								} else {			// error			crm_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/ead633eb23a5e8206743fb4f7634ad71518a2631/tengine.c/buggy/crm/tengine/tengine.c