buffer = (char*)msg->msg_body; root_xml_node = string2xml(buffer);
sys_to = cl_get_string(new_input->msg, F_CRM_SYS_TO); type   = cl_get_string(new_input->msg, F_CRM_MSG_TYPE);
subsystem_msg_dispatch(IPC_Channel *sender, void *user_data){	int lpc = 0;	char *buffer = NULL;	IPC_Message *msg = NULL;	gboolean all_is_well = TRUE;	xmlNodePtr root_xml_node = NULL;	const char *sys_to;	const char *type;	while(sender->ops->is_message_pending(sender)) {		if (sender->ch_status == IPC_DISCONNECT) {			/* The message which was pending for us is that			 * the IPC status is now IPC_DISCONNECT */			break;		}		if (sender->ops->recv(sender, &msg) != IPC_OK) {			perror("Receive failure:");			return !all_is_well;		}		if (msg == NULL) {			crm_err("No message this time");			continue;		}		lpc++;		buffer = (char*)msg->msg_body;		root_xml_node = string2xml(buffer);		sys_to= xmlGetProp(root_xml_node, XML_ATTR_SYSTO);		type  = xmlGetProp(root_xml_node, XML_ATTR_MSGTYPE);		if (root_xml_node == NULL) {			crm_err("Root node was NULL!!");		} else if(sys_to == NULL) {			crm_err("Value of %s was NULL!!",			       XML_ATTR_SYSTO);					} else if(type == NULL) {			crm_err("Value of %s was NULL!!",			       XML_ATTR_MSGTYPE);					} else {			gboolean (*process_function)				(xmlNodePtr msg, IPC_Channel *sender) = NULL;			process_function = user_data;						if(process_function(root_xml_node, sender) == FALSE) {				crm_warn("Received a message destined for %s"					 " by mistake", sys_to);			}					}		free_xml(root_xml_node);		root_xml_node = NULL;				msg->msg_done(msg);		msg = NULL;	}	/* clean up after a break */	if(msg != NULL)		msg->msg_done(msg);	if(root_xml_node != NULL)		free_xml(root_xml_node);	crm_verbose("Processed %d messages", lpc);	if (sender->ch_status == IPC_DISCONNECT) {		crm_err("The server has left us: Shutting down...NOW");		exit(1); /* shutdown properly later */				return !all_is_well;	}	return all_is_well;}