processing_complete = TRUE;
if(sys_cc == NULL || strcmp(sys_cc, CRM_SYSTEM_DC) != 0) processing_complete = TRUE;
relay_message(xmlNodePtr xml_relay_message, gboolean originated_locally){	const char *host_to = xmlGetProp(xml_relay_message, XML_ATTR_HOSTTO);	const char *sys_to  = xmlGetProp(xml_relay_message, XML_ATTR_SYSTO);	gboolean processing_complete = FALSE;	int is_for_dc  = 0;	int is_for_dcib  = 0;	int is_for_crm = 0;	int is_local   = 0;	FNIN();	if(xml_relay_message != NULL	   && strcmp(XML_MSG_TAG, xml_relay_message->name) != 0) {		xml_message_debug(xml_relay_message,				  "Bad message type, should be crm_message");		cl_log(LOG_INFO,		       "Ignoring message of type %s",		       xml_relay_message->name);		FNRET(TRUE);	}		if(sys_to == NULL) {		xml_message_debug(xml_relay_message,				  "Message did not have any value for sys_to");		cl_log(LOG_ERR, "Message did not have any value for %s",		       XML_ATTR_SYSTO);		FNRET(TRUE);	}		is_for_dc   = (strcmp(CRM_SYSTEM_DC, sys_to) == 0);	is_for_dcib = (strcmp(CRM_SYSTEM_DCIB, sys_to) == 0);	is_for_crm  = (strcmp(CRM_SYSTEM_CRMD, sys_to) == 0);		is_local = 0;	if(host_to == NULL || strlen(host_to) == 0) {		if(is_for_dc)			is_local = 0;		else if(is_for_crm && originated_locally)			is_local = 0;		else			is_local = 1;			} else if(strcmp(fsa_our_uname, host_to) == 0) {		is_local=1;	}	CRM_DEBUG2("is_local    %d", is_local);	CRM_DEBUG2("is_for_dcib %d", is_for_dcib);	CRM_DEBUG2("is_for_dc   %d", is_for_dc);	CRM_DEBUG2("is_for_crm  %d", is_for_crm);	CRM_DEBUG2("AM_I_DC     %d", AM_I_DC);	CRM_DEBUG2("sys_to      %s", sys_to);	CRM_DEBUG2("host_to     %s", host_to);		if(is_for_dc || is_for_dcib) {		if(AM_I_DC) {			ROUTER_RESULT("Message result: DC/CRMd process");			processing_complete = FALSE; // more to be done by caller		} else if(originated_locally) {			ROUTER_RESULT("Message result: External relay to DC");			send_msg_via_ha(xml_relay_message, NULL);			processing_complete = TRUE; 		} else {			ROUTER_RESULT("Message result: Discard, not DC");			processing_complete = TRUE; // discard		}			} else if(is_local && is_for_crm) {		ROUTER_RESULT("Message result: CRMd process");		; // more to be done by caller	} else if(is_local) {		ROUTER_RESULT("Message result: Local relay");		CRM_DEBUG2("Message result: Local relay to %s", sys_to);		send_msg_via_ipc(xml_relay_message, sys_to);		processing_complete = TRUE;	} else {/* 		const char *sys_from  = *//* 			xmlGetProp(xml_relay_message, XML_ATTR_SYSFROM); *//* 		if(AM_I_DC && strcmp(CRM_SYSTEM_CIB, sys_from) == 0) { *//* 			// we are a special CIB *//* 			xmlSetProp(xml_relay_message, *//* 				   XML_ATTR_SYSFROM, *//* 				   CRM_SYSTEM_DCIB); *//* 		} */		ROUTER_RESULT("Message result: External relay");		CRM_DEBUG2("Message result: External relay to %s", host_to);		send_msg_via_ha(xml_relay_message, host_to);		processing_complete = TRUE;	}		FNRET(processing_complete);}