char *xml_text = dump_xml_unformatted(msg_data); ha_msg_add(request, F_CRM_DATA, xml_text); crm_free(xml_text);
add_message_xml(request, F_CRM_DATA, msg_data);
create_request_adv(const char *task, crm_data_t *msg_data,		   const char *host_to,  const char *sys_to,		   const char *sys_from, const char *uuid_from,		   const char *origin){	char *true_from = NULL;	HA_Message *request = NULL;	char *reference = generateReference(task, sys_from);	if (uuid_from != NULL) {		true_from = generate_hash_key(sys_from, uuid_from);	} else if(sys_from != NULL) {		true_from = crm_strdup(sys_from);	} else {		crm_err("No sys from specified");	}		/* host_from will get set for us if necessary by CRMd when routed */	request = ha_msg_new(11);	ha_msg_add(request, F_CRM_ORIGIN,	origin);	ha_msg_add(request, F_TYPE,		T_CRM);	ha_msg_add(request, F_CRM_VERSION,	CRM_VERSION);	ha_msg_add(request, F_CRM_MSG_TYPE,     XML_ATTR_REQUEST);	ha_msg_add(request, XML_ATTR_REFERENCE, reference);	ha_msg_add(request, F_CRM_TASK,		task);	ha_msg_add(request, F_CRM_SYS_TO,       sys_to);	ha_msg_add(request, F_CRM_SYS_FROM,     true_from);	/* HOSTTO will be ignored if it is to the DC anyway. */	if(host_to != NULL && strlen(host_to) > 0) {		ha_msg_add(request, F_CRM_HOST_TO,  host_to);	}	if (msg_data != NULL) {		char *xml_text = dump_xml_unformatted(msg_data);		ha_msg_add(request, F_CRM_DATA, xml_text);		crm_free(xml_text);	}	crm_free(reference);	crm_free(true_from);		return request;}