send_abort("Stonith/shutdown event not matched", node_state);
send_complete( "Stonith/shutdown event not matched", node_state, te_update);
extract_event(crm_data_t *msg){	gboolean abort  = FALSE;	const char *event_node = NULL;/*[cib fragment]...<status>   <node_state id="node1" state=CRMD_STATE_ACTIVE exp_state="active">     <lrm>       <lrm_resources>	 <rsc_state id="" rsc_id="rsc4" node_id="node1" rsc_state="stopped"/>*/	crm_trace("Extracting event from %s", crm_element_name(msg));	xml_child_iter(		msg, node_state, XML_CIB_TAG_STATE,		crm_data_t *resources = NULL;		const char *ccm_state  = crm_element_value(			node_state, XML_CIB_ATTR_INCCM);		const char *crmd_state = crm_element_value(			node_state, XML_CIB_ATTR_CRMDSTATE);		const char *join_state = crm_element_value(			node_state, XML_CIB_ATTR_JOINSTATE);		crm_xml_devel(node_state,"Processing");				if(crm_element_value(node_state, XML_CIB_ATTR_SHUTDOWN) != NULL) {			send_abort("Aborting on "XML_CIB_ATTR_SHUTDOWN" attribute", node_state);			break;					} else if(crm_element_value(node_state, XML_CIB_ATTR_STONITH) != NULL) {			/* node marked for STONITH			 *   possibly by us when a shutdown timmed out			 */			int action_id = -1;			crm_devel("Checking for STONITH");			event_node = crm_element_value(node_state, XML_ATTR_UNAME);			action_id = match_down_event(				event_node, CRM_OP_SHUTDOWN, LRM_OP_DONE);						if(action_id < 0) {				send_abort("Stonith/shutdown event not matched", node_state);				break;			} else {				process_trigger(action_id);				check_for_completion();			}			continue;		}		resources = find_xml_node(node_state, XML_CIB_TAG_LRM, FALSE);		resources = find_xml_node(			resources, XML_LRM_TAG_RESOURCES, FALSE);		if(crmd_state != NULL || ccm_state != NULL || join_state != NULL) {			/* simple node state update...			 *   possibly from a shutdown we requested			 */			crm_devel("Processing state update");			if(crmd_state != NULL			   && safe_str_neq(crmd_state, OFFLINESTATUS)) {				/* the node is comming up,				 *  only recompute after the join completes,				 *  we dont need to check for this				 */				continue;							} else if(join_state != NULL				  && safe_str_neq(join_state, CRMD_JOINSTATE_DOWN)) {				/* the node is comming up,				 *  only recompute after the join completes,				 *  we dont need to check for this				 */				continue;			} else {				/* this may be called more than once per shutdown				 * ie. once per update of each field				 */				int action_id = -1;				crm_devel("Checking if this was a known shutdown");				event_node = crm_element_value(node_state, XML_ATTR_UNAME);				action_id = match_down_event(					event_node, NULL, LRM_OP_DONE);				if(action_id < 0) {					send_abort("Stonith/shutdown event not matched", node_state);					break;				} else {					process_trigger(action_id);					check_for_completion();				}			}						if(ccm_state != NULL && crm_is_true(ccm_state)) {				crm_devel("Ignore - new CCM node");			}		}		if(resources != NULL) {			/* LRM resource update...			 */			xml_child_iter(				resources, child, NULL, 				crm_xml_devel(child, "Processing LRM resource update");				abort = !process_graph_event(child);				if(abort) {					break;				}				);						if(abort) {				break;			}		}		);		return !abort;}