op = CRM_OP_TETIMEOUT;
send_complete(const char *text, crm_data_t *msg, te_reason_t reason){		HA_Message *cmd = NULL;	const char *op = CRM_OP_TEABORT;	/* the transition is over... ignore all future callbacks	 * resulting from our CIB updates (usually for pending operations)	 */	remove_cib_op_callback(-1, TRUE);		if(reason == te_done) {		op = CRM_OP_TECOMPLETE;		if(in_transition == FALSE) {			crm_warn("Not in transition, not sending message");			return;		}	} else if(reason == te_timeout) {		op = CRM_OP_TETIMEOUT;		if(in_transition == FALSE) {			crm_err("Not in transition, not sending message");			return;		}	}	switch(reason) {		case te_update:			crm_debug("Transition status: %s by CIB update: %s",				  in_transition?"Aborted":"Triggered", text);			if(msg != NULL) {				if(safe_str_eq(crm_element_name(msg),					       XML_TAG_CIB)) {					crm_data_t *status = get_object_root(XML_CIB_TAG_STATUS, msg);					crm_data_t *generation = create_xml_node(NULL, XML_TAG_CIB);					crm_debug("Cause:"						 " full CIB replace/update");					copy_in_properties(generation, msg);					crm_xml_debug(generation, "[generation]");					crm_xml_debug(status, "[in ]");					free_xml(generation);									} else {					crm_xml_debug(msg, "Cause");				}			}			print_state(LOG_DEBUG);			break;		case te_done:			crm_info("Transition status: Complete%s%s",				 text?": ":"", text?text:"");			print_state(LOG_DEBUG);			break;		case te_timeout:			crm_err("Transition status: Timed out after %dms",				transition_timer->timeout);			print_state(LOG_WARNING);			break;		case te_failed:			crm_err("Transition status: Aborted by failed action: %s",				 text);			crm_xml_debug(msg, "Cause");			print_state(LOG_WARNING);			break;	}		in_transition = FALSE;	initialize_graph();	cmd = create_request(		op, NULL, NULL, CRM_SYSTEM_DC, CRM_SYSTEM_TENGINE, NULL);	if(text != NULL) {		ha_msg_add(cmd, "message", text);	}	#ifdef TESTING	if(reason == te_done) {		crm_log_message(LOG_INFO, cmd);	} else {		crm_log_message(LOG_ERR, cmd);	}		g_main_quit(mainloop);	return;#else	send_ipc_message(crm_ch, cmd);#endif	}