CRM_DEBUG2("mem used by xml: %d", xmlMemUsed());
CRM_DEBUG("mem used by xml: %d", xmlMemUsed());
dump_xml_node(xmlNodePtr msg, gboolean whole_doc){	int lpc = 0;	int msg_size = -1;	xmlChar *xml_message = NULL;	xmlBufferPtr xml_buffer;	FNIN();	if (msg == NULL) FNRET(NULL);	xmlInitParser();	if (whole_doc) {		if (msg->doc == NULL) {			xmlDocPtr foo = xmlNewDoc("1.0");			xmlDocSetRootElement(foo, msg);			xmlSetTreeDoc(msg,foo);		}		xmlDocDumpMemory(msg->doc, &xml_message, &msg_size);	} else {#ifdef XML_TRACE		CRM_DEBUG2("mem used by xml: %d", xmlMemUsed());#endif    		xmlMemoryDump ();			xml_buffer = xmlBufferCreate();		msg_size = xmlNodeDump(xml_buffer, msg->doc, msg, 0, 0);		xml_message =			(xmlChar*)cl_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); }