} else if(AM_I_DC == FALSE
} else if(AM_I_DC
handle_message(xmlNodePtr stored_msg){	enum crmd_fsa_input next_input = I_NULL;	xmlNodePtr options = find_xml_node(stored_msg, XML_TAG_OPTIONS);	const char *sys_to   = xmlGetProp(stored_msg, XML_ATTR_SYSTO);	const char *sys_from = xmlGetProp(stored_msg, XML_ATTR_SYSFROM);	const char *type     = xmlGetProp(stored_msg, XML_ATTR_MSGTYPE);	const char *op       = xmlGetProp(options,    XML_ATTR_OP);	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(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_ANNOUNCE) == 0) {			next_input = I_NODE_JOIN;/* admins may want to do this						} else if(strcmp(op, CRM_OPERATION_STORE) == 0 && AM_I_DC) {			next_input = I_RELEASE_DC;*/		} else if(strcmp(op, CRM_OPERATION_STORE) == 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 == FALSE			  && (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;						} else if(strcmp(op, CRM_OPERATION_JOINACK) == 0) {			next_input = I_WELCOME_ACK;						} else if(AM_I_DC			  && (strcmp(op, CRM_OPERATION_CREATE) == 0			      || strcmp(op, CRM_OPERATION_UPDATE) == 0			      || strcmp(op, CRM_OPERATION_DELETE) == 0			      || strcmp(op, CRM_OPERATION_ERASE) == 0)) {			// perhaps we should do somethign with these replies			fprintf(router_strm, "Message result: CIB Reply\n");			next_input = I_CIB_UPDATE;					} else if(AM_I_DC && strcmp(op, CRM_OPERATION_BUMP) == 0) {			xmlNodePtr data =				find_xml_node(stored_msg, XML_TAG_FRAGMENT);						send_request(NULL, data, CRM_OPERATION_STORE,				     NULL, CRM_SYSTEM_CRMD);		} else if (AM_I_DC && strcmp(op, CRM_OPERATION_STORE) == 0) {			/* if there was any result, we need to merge it back			 * into our (the DC) copy of the CIB			 */			xmlNodePtr data =				find_xml_node(stored_msg, XML_TAG_FRAGMENT);			const char *status =				xmlGetProp(options, XML_ATTR_RESULT);			if(status != NULL			   && strcmp(status, "ok") == 0			   && data != NULL) {				send_request(NULL, data, CRM_OPERATION_UPDATE,					     NULL, CRM_SYSTEM_CIB);			} else if(data != NULL) {				cl_log(LOG_ERR,				       "Store failed with response [%s]",				       status);							} else {				;			}					} else if(AM_I_DC			  && strcmp(sys_from, CRM_SYSTEM_CIB) == 0			  && strcmp(op, CRM_OPERATION_FORWARD) == 0) {							/* this is a reply to our earlier command			 * Send it to the relevant node(s)			 */			const char *uname = xmlGetProp(options,						       "forward_to");			xmlNodePtr data = find_xml_node(stored_msg,							XML_TAG_FRAGMENT);			xmlNodePtr local_options =				create_xml_node(NULL, XML_TAG_OPTIONS);			/* If this is part of join request processing,			 * ask for the status section, otherwise just blast			 * it down to them.			 */			if(uname != NULL) {				set_xml_property_copy(local_options,						      XML_ATTR_VERBOSE,						      "true");			}						send_request(local_options, data, CRM_OPERATION_STORE,				     uname, CRM_SYSTEM_CRMD);						} else {			cl_log(LOG_ERR,			       "Unexpected response (op=%s) sent to the %s",			       op, AM_I_DC?"DC":"CRMd");		}	} else {		cl_log(LOG_ERR, "Unexpected message type %s", type);				}			return next_input;		}