CRM_DEBUG("delete me - 3.");
dump_xml_node(xmlNodePtr msg, gboolean whole_doc){    CRM_DEBUG("delete me - 2.");    xmlChar *xml_message = NULL;    if(msg == NULL) return NULL;    int msg_size = -1;    CRM_DEBUG("delete me - 3.");    xmlInitParser();    CRM_DEBUG("delete me - 4.");    if(whole_doc)    {	CRM_DEBUG("delete me - 5.");	if(msg->doc == NULL)	{	    cl_log(LOG_ERR, "XML doc was NULL");	    return NULL;	}	xmlDocDumpMemory(msg->doc, &xml_message, &msg_size);	CRM_DEBUG("delete me - 5.5");    }    else    {	CRM_DEBUG("delete me - 6.");/* 	if(0) *//* 	{ */	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));		xml_message = (xmlChar*)strdup((char*)xml_buffer->content); 	if(!xml_message) {		cl_log(LOG_ERR, "memory allocation failed in dump_xml_node()");		return NULL;	}	//	CRM_DEBUG2("Before free: [%s]", xml_message);	xmlBufferFree(xml_buffer);//	CRM_DEBUG2("After free: [%s]", xml_message);    }    CRM_DEBUG2("Dumped %d XML characters into buffer", msg_size);    // HA wont send messages with newlines in them.    int lpc = 0;    for(; lpc < msg_size; lpc++)	if(xml_message[lpc] == '\n')	    xml_message[lpc] = ' ';        return (char*)xml_message; }