*/
validate_crm_message(xmlNodePtr root_xml_node,		     const char *sys,		     const char *uid,		     const char *msg_type){	const char *from = NULL;	const char *to = NULL;	const char *type = NULL;	const char *crm_msg_reference = NULL;	xmlNodePtr action = NULL;		FNIN();	if (root_xml_node == NULL)		FNRET(NULL);	from = xmlGetProp(root_xml_node, XML_ATTR_SYSFROM);	to   = xmlGetProp(root_xml_node, XML_ATTR_SYSTO);	type = xmlGetProp(root_xml_node, XML_ATTR_MSGTYPE);		crm_msg_reference = xmlGetProp(root_xml_node,				       XML_ATTR_REFERENCE);	cl_log(LOG_DEBUG, "Recieved XML message with (version=%s)",	       xmlGetProp(root_xml_node, XML_ATTR_VERSION));	cl_log(LOG_DEBUG, "Recieved XML message with (from=%s)", from);	cl_log(LOG_DEBUG, "Recieved XML message with (to=%s)"  , to);	cl_log(LOG_DEBUG, "Recieved XML message with (type=%s)", type);	cl_log(LOG_DEBUG, "Recieved XML message with (ref=%s)" ,	       crm_msg_reference);	action = root_xml_node;	const char *true_sys = sys;	if (uid != NULL) true_sys = generate_hash_key(sys, uid);	if (to == NULL) {		cl_log(LOG_INFO, "No sub-system defined.");		action = NULL;	} else if (true_sys != NULL && strcmp(to, true_sys) != 0) {		cl_log(LOG_DEBUG,		       "The message is not for this sub-system (%s != %s).",		       to,		       true_sys);		action = NULL;	}    	if (type == NULL) {		cl_log(LOG_INFO, "No message type defined.");		FNRET(NULL);	} else if (msg_type != NULL && strcmp(msg_type, type) != 0) {		cl_log(LOG_INFO,		       "Expecting a (%s) message but receieved a (%s).",		       msg_type, type);		action = NULL;	}	if (crm_msg_reference == NULL) {		cl_log(LOG_INFO, "No message crm_msg_reference defined.");		action = NULL;	}	if(action != NULL)		cl_log(LOG_DEBUG,		       "XML is valid and node with message type (%s) found.",		       type);		cl_log(LOG_DEBUG, "Returning node (%s)", xmlGetNodePath(action));	FNRET(action);}