} else if(strcmp(op, CRM_OPERATION_VOTE) == 0 || strcmp(op, CRM_OPERATION_HBEAT) == 0 || strcmp(op, CRM_OPERATION_WELCOME) == 0 || strcmp(op, CRM_OPERATION_SHUTDOWN_REQ) == 0 || strcmp(op, CRM_OPERATION_SHUTDOWN) == 0 || strcmp(op, CRM_OPERATION_ANNOUNCE) == 0) {
} else if(strcmp(op, CRM_OP_VOTE) == 0 || strcmp(op, CRM_OP_HBEAT) == 0 || strcmp(op, CRM_OP_WELCOME) == 0 || strcmp(op, CRM_OP_SHUTDOWN_REQ) == 0 || strcmp(op, CRM_OP_SHUTDOWN) == 0 || strcmp(op, CRM_OP_ANNOUNCE) == 0) {
handle_message(xmlNodePtr stored_msg){	enum crmd_fsa_input next_input = I_NULL;	const char *sys_to   = get_xml_attr(stored_msg, NULL,					    XML_ATTR_SYSTO, TRUE);	const char *sys_from = get_xml_attr(stored_msg, NULL,					    XML_ATTR_SYSFROM, TRUE);	const char *host_from = get_xml_attr(stored_msg, NULL,					    XML_ATTR_HOSTFROM, TRUE);	const char *msg_ref  = get_xml_attr(stored_msg, NULL,					    XML_ATTR_REFERENCE, TRUE);	const char *type     = get_xml_attr(stored_msg, NULL,					    XML_ATTR_MSGTYPE, TRUE);		const char *op       = get_xml_attr(stored_msg, XML_TAG_OPTIONS,					    XML_ATTR_OP, TRUE);//	xml_message_debug(stored_msg, "Processing message");	cl_log(LOG_DEBUG,	       "Received %s %s in state %s",	       op, type, fsa_state2string(fsa_state));		if(type == NULL || op == NULL) {		cl_log(LOG_ERR, "Ignoring message (type=%s), (op=%s)",		       type, op);		xml_message_debug(stored_msg, "Bad message");			} else if(strcmp(type, XML_ATTR_REQUEST) == 0){		if(strcmp(op, CRM_OPERATION_VOTE) == 0) {			next_input = I_ELECTION;						} else if(AM_I_DC && strcmp(op, "te_abort") == 0) {			next_input = I_PE_CALC;						} else if(AM_I_DC			  && strcmp(op, "te_complete") == 0) {			if(fsa_state == S_TRANSITION_ENGINE) {				next_input = I_SUCCESS;/* silently ignore? probably means the TE is signaling OK too early			} else {				cl_log(LOG_WARNING,				       "Op %s is only valid in state %s (%s)",				       op,				       fsa_state2string(S_TRANSITION_ENGINE),				       fsa_state2string(fsa_state));*/			}			} else if(strcmp(op, CRM_OPERATION_HBEAT) == 0) {			next_input = I_DC_HEARTBEAT;						} else if(strcmp(op, CRM_OPERATION_WELCOME) == 0) {			next_input = I_WELCOME;						} else if(strcmp(op, CRM_OPERATION_SHUTDOWN_REQ) == 0) {			/* create cib fragment and add to message */			/* handle here to avoid potential version issues			 *   where the shutdown message/proceedure may have			 *   been changed in later versions.			 *			 * This way the DC is always in control of the shutdown			 */			xmlNodePtr frag = NULL;			time_t now = time(NULL);			char *now_s = crm_itoa((int)now);			xmlNodePtr node_state =				create_xml_node(NULL, XML_CIB_TAG_STATE);			cl_log(LOG_INFO, "Creating shutdown request for %s",			       host_from);						set_xml_property_copy(node_state, XML_ATTR_ID, host_from);			set_xml_property_copy(node_state, "shutdown",  now_s);			set_xml_property_copy(node_state, "exp_state", "down");			frag = create_cib_fragment(node_state, NULL);			xmlAddChild(stored_msg, frag);			free_xml(node_state);			crm_free(now_s);						next_input = I_CIB_OP;						} else if(strcmp(op, CRM_OPERATION_SHUTDOWN) == 0) {			next_input = I_TERMINATE;					} else if(strcmp(op, CRM_OPERATION_ANNOUNCE) == 0) {			next_input = I_NODE_JOIN;					} else if(strcmp(op, CRM_OPERATION_REPLACE) == 0			|| strcmp(op, CRM_OPERATION_ERASE) == 0) {			next_input = I_CIB_OP;			fprintf(router_strm, "Message result: CIB Op\n");		} else if(AM_I_DC			  && (strcmp(op, CRM_OPERATION_CREATE) == 0			      || strcmp(op, CRM_OPERATION_UPDATE) == 0			      || strcmp(op, CRM_OPERATION_DELETE) == 0)) {			/* updates should only be performed on the DC */			next_input = I_CIB_OP;						} else if(strcmp(op, CRM_OPERATION_PING) == 0) {			/* eventually do some stuff to figure out			 * if we /are/ ok			 */			xmlNodePtr ping =				createPingAnswerFragment(sys_to, "ok");							xmlNodePtr wrapper = create_reply(stored_msg, ping);			relay_message(wrapper, TRUE);			free_xml(wrapper);						} else {			cl_log(LOG_ERR,			       "Unexpected request (op=%s) sent to the %s",			       op, AM_I_DC?"DC":"CRMd");		}			} else if(strcmp(type, XML_ATTR_RESPONSE) == 0) {		if(strcmp(op, CRM_OPERATION_WELCOME) == 0) {			next_input = I_WELCOME_ACK;						} else if(AM_I_DC			  && strcmp(op, "pecalc") == 0) {			if(fsa_state == S_POLICY_ENGINE			   && safe_str_eq(msg_ref, fsa_pe_ref)) {				next_input = I_SUCCESS;			} else if(fsa_state != S_POLICY_ENGINE) {				cl_log(LOG_ERR,				       "Reply to %s is only valid in state %s",				       op, fsa_state2string(S_POLICY_ENGINE));							} else {				CRM_DEBUG("Skipping superceeded reply from %s",					  sys_from);			}					} else if(strcmp(op, CRM_OPERATION_VOTE) == 0			  || strcmp(op, CRM_OPERATION_HBEAT) == 0			  || strcmp(op, CRM_OPERATION_WELCOME) == 0			  || strcmp(op, CRM_OPERATION_SHUTDOWN_REQ) == 0			  || strcmp(op, CRM_OPERATION_SHUTDOWN) == 0			  || strcmp(op, CRM_OPERATION_ANNOUNCE) == 0) {			next_input = I_NULL;					} else if(strcmp(op, CRM_OPERATION_CREATE) == 0			  || strcmp(op, CRM_OPERATION_UPDATE) == 0			  || strcmp(op, CRM_OPERATION_DELETE) == 0			  || strcmp(op, CRM_OPERATION_REPLACE) == 0			  || strcmp(op, CRM_OPERATION_ERASE) == 0) {						/* perhaps we should do somethign with these replies,			 * especially check that the actions passed			 *//* 			fprintf(router_strm, "Message result: CIB Reply\n"); */		} else {			cl_log(LOG_ERR,			       "Unexpected response (op=%s) sent to the %s",			       op, AM_I_DC?"DC":"CRMd");			next_input = I_NULL;		}	} else {		cl_log(LOG_ERR, "Unexpected message type %s", type);				}/* 	CRM_DEBUG("%s: Next input is %s", __FUNCTION__, *//* 		   fsa_input2string(next_input)); */				return next_input;		}