CRM_DEBUG("About to dump XML into buffer");
dump_xml_node(xmlNodePtr msg, gboolean whole_doc){	int lpc = 0;	int msg_size = -1;	FNIN();	xmlChar *xml_message = NULL;	if (msg == NULL) FNRET(NULL);	xmlInitParser();	if (whole_doc) {		if (msg->doc == NULL) {			cl_log(LOG_ERR, "XML doc was NULL");			FNRET(NULL);		}		xmlDocDumpMemory(msg->doc, &xml_message, &msg_size);	} else {		CRM_DEBUG2("mem used by xml: %d", xmlMemUsed());    		xmlMemoryDump ();			xmlBufferPtr xml_buffer = xmlBufferCreate();		CRM_DEBUG("About to dump XML into buffer");		msg_size = xmlNodeDump(xml_buffer, msg->doc, msg, 0, 0);		//CRM_DEBUG2("Dumped XML into buffer: [%s]", xmlBufferContent(xml_buffer));		CRM_DEBUG2("Dumped %d XML characters into buffer", msg_size);			xml_message =			(xmlChar*)ha_strdup(xmlBufferContent(xml_buffer)); 		xmlBufferFree(xml_buffer);		if (!xml_message) {			cl_log(LOG_ERR,			       "memory allocation failed in dump_xml_node()");		}	}	// HA wont send messages with newlines in them.	for(; xml_message != NULL && lpc < msg_size; lpc++)		if (xml_message[lpc] == '\n')			xml_message[lpc] = ' ';    	FNRET((char*)xml_message); }